mirror of
https://github.com/0rangebananaspy/authelia.git
synced 2024-09-14 22:47:21 +07:00
18 lines
619 B
TypeScript
18 lines
619 B
TypeScript
import Express = require("express");
|
|
import Endpoints = require("../../../../../shared/api");
|
|
import FirstFactorBlocker from "../FirstFactorBlocker";
|
|
import BluebirdPromise = require("bluebird");
|
|
import AuthenticationSession = require("../../AuthenticationSession");
|
|
|
|
export default FirstFactorBlocker(handler);
|
|
|
|
function handler(req: Express.Request, res: Express.Response): BluebirdPromise<void> {
|
|
return AuthenticationSession.get(req)
|
|
.then(function (authSession) {
|
|
res.render("already-logged-in", {
|
|
logout_endpoint: Endpoints.LOGOUT_GET,
|
|
username: authSession.userid
|
|
});
|
|
});
|
|
}
|