diff --git a/server/src/lib/AuthenticationValidator.ts b/server/src/lib/AuthenticationValidator.ts deleted file mode 100644 index 386368006..000000000 --- a/server/src/lib/AuthenticationValidator.ts +++ /dev/null @@ -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 { - 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(); - }); -} \ No newline at end of file diff --git a/server/src/lib/routes/firstfactor/get.ts b/server/src/lib/routes/firstfactor/get.ts index ef6a4b5be..14faa225e 100644 --- a/server/src/lib/routes/firstfactor/get.ts +++ b/server/src/lib/routes/firstfactor/get.ts @@ -3,7 +3,6 @@ import express = require("express"); import objectPath = require("object-path"); import winston = require("winston"); import Endpoints = require("../../../../../shared/api"); -import AuthenticationValidator = require("../../AuthenticationValidator"); import BluebirdPromise = require("bluebird"); import { AuthenticationSessionHandler } from "../../AuthenticationSessionHandler"; import Constants = require("../../../../../shared/constants"); diff --git a/server/src/lib/routes/verify/get.ts b/server/src/lib/routes/verify/get.ts index 98993ec6a..cec6e157c 100644 --- a/server/src/lib/routes/verify/get.ts +++ b/server/src/lib/routes/verify/get.ts @@ -4,7 +4,6 @@ import BluebirdPromise = require("bluebird"); import express = require("express"); import exceptions = require("../../Exceptions"); import winston = require("winston"); -import AuthenticationValidator = require("../../AuthenticationValidator"); import ErrorReplies = require("../../ErrorReplies"); import { AppConfiguration } from "../../configuration/Configuration"; import { AuthenticationSessionHandler } from "../../AuthenticationSessionHandler";