mirror of
https://github.com/0rangebananaspy/authelia.git
synced 2024-09-14 22:47:21 +07:00
Remove unused AuthenticationValidator
This commit is contained in:
parent
17a5e2ad6e
commit
e93b98c1ec
|
@ -1,17 +0,0 @@
|
||||||
|
|
||||||
import BluebirdPromise = require("bluebird");
|
|
||||||
import express = require("express");
|
|
||||||
import objectPath = require("object-path");
|
|
||||||
import FirstFactorValidator = require("./FirstFactorValidator");
|
|
||||||
import { AuthenticationSessionHandler } from "./AuthenticationSessionHandler";
|
|
||||||
import { IRequestLogger } from "./logging/IRequestLogger";
|
|
||||||
|
|
||||||
export function validate(req: express.Request, logger: IRequestLogger): BluebirdPromise<void> {
|
|
||||||
return FirstFactorValidator.validate(req, logger)
|
|
||||||
.then(function () {
|
|
||||||
const authSession = AuthenticationSessionHandler.get(req, logger);
|
|
||||||
if (!authSession.second_factor)
|
|
||||||
return BluebirdPromise.reject("No second factor variable.");
|
|
||||||
return BluebirdPromise.resolve();
|
|
||||||
});
|
|
||||||
}
|
|
|
@ -3,7 +3,6 @@ import express = require("express");
|
||||||
import objectPath = require("object-path");
|
import objectPath = require("object-path");
|
||||||
import winston = require("winston");
|
import winston = require("winston");
|
||||||
import Endpoints = require("../../../../../shared/api");
|
import Endpoints = require("../../../../../shared/api");
|
||||||
import AuthenticationValidator = require("../../AuthenticationValidator");
|
|
||||||
import BluebirdPromise = require("bluebird");
|
import BluebirdPromise = require("bluebird");
|
||||||
import { AuthenticationSessionHandler } from "../../AuthenticationSessionHandler";
|
import { AuthenticationSessionHandler } from "../../AuthenticationSessionHandler";
|
||||||
import Constants = require("../../../../../shared/constants");
|
import Constants = require("../../../../../shared/constants");
|
||||||
|
|
|
@ -4,7 +4,6 @@ import BluebirdPromise = require("bluebird");
|
||||||
import express = require("express");
|
import express = require("express");
|
||||||
import exceptions = require("../../Exceptions");
|
import exceptions = require("../../Exceptions");
|
||||||
import winston = require("winston");
|
import winston = require("winston");
|
||||||
import AuthenticationValidator = require("../../AuthenticationValidator");
|
|
||||||
import ErrorReplies = require("../../ErrorReplies");
|
import ErrorReplies = require("../../ErrorReplies");
|
||||||
import { AppConfiguration } from "../../configuration/Configuration";
|
import { AppConfiguration } from "../../configuration/Configuration";
|
||||||
import { AuthenticationSessionHandler } from "../../AuthenticationSessionHandler";
|
import { AuthenticationSessionHandler } from "../../AuthenticationSessionHandler";
|
||||||
|
|
Loading…
Reference in New Issue
Block a user