mirror of
https://github.com/0rangebananaspy/authelia.git
synced 2024-09-14 22:47:21 +07:00
Merge branch 'develop' into remove-schema-from-source
This commit is contained in:
commit
b6aca2619b
|
@ -2,12 +2,16 @@ import Express = require("express");
|
||||||
import Endpoints = require("../../../../../shared/api");
|
import Endpoints = require("../../../../../shared/api");
|
||||||
import FirstFactorBlocker from "../FirstFactorBlocker";
|
import FirstFactorBlocker from "../FirstFactorBlocker";
|
||||||
import BluebirdPromise = require("bluebird");
|
import BluebirdPromise = require("bluebird");
|
||||||
|
import AuthenticationSession = require("../../AuthenticationSession");
|
||||||
|
|
||||||
export default FirstFactorBlocker(handler);
|
export default FirstFactorBlocker(handler);
|
||||||
|
|
||||||
function handler(req: Express.Request, res: Express.Response): BluebirdPromise<void> {
|
function handler(req: Express.Request, res: Express.Response): BluebirdPromise<void> {
|
||||||
res.render("already-logged-in", {
|
return AuthenticationSession.get(req)
|
||||||
logout_endpoint: Endpoints.LOGOUT_GET
|
.then(function (authSession) {
|
||||||
});
|
res.render("already-logged-in", {
|
||||||
return BluebirdPromise.resolve();
|
logout_endpoint: Endpoints.LOGOUT_GET,
|
||||||
|
username: authSession.userid
|
||||||
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,5 +5,5 @@ block form-header
|
||||||
<img class="header-img" src="/img/success.png" alt="">
|
<img class="header-img" src="/img/success.png" alt="">
|
||||||
|
|
||||||
block content
|
block content
|
||||||
<p>You are already logged in.<br/>
|
<p>You are already logged in as <b>#{ username }</b>.<br/>
|
||||||
| Click <a href="#{ logout_endpoint }">here</a> to log off.<p>
|
| Click <a href="#{ logout_endpoint }">here</a> to log off.<p>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user