1
0
mirror of https://github.com/bpatrik/pigallery2.git synced 2025-12-07 23:23:49 +02:00

implementing logout

This commit is contained in:
Braun Patrik
2016-05-16 23:15:03 +02:00
parent 540df6c6a8
commit cbcc68dd86
9 changed files with 70 additions and 16 deletions

View File

@@ -9,6 +9,7 @@ import {RenderingMWs} from "../middlewares/RenderingMWs";
export class UserRouter {
constructor(private app) {
this.addLogin();
this.addLogout();
this.addGetSessionUser();
this.addChangePassword();
@@ -27,6 +28,15 @@ export class UserRouter {
);
};
private addLogout() {
this.app.post("/api/user/logout",
AuthenticationMWs.authenticate,
AuthenticationMWs.logout,
RenderingMWs.renderOK
);
};
private addGetSessionUser() {
this.app.get("/api/user/login",
AuthenticationMWs.authenticate,