Routes /cas/login and /cas/logout

This commit is contained in:
joker-x 2020-09-06 02:28:20 +02:00
parent 28938b679b
commit 0738cddcd6
3 changed files with 42 additions and 6 deletions

View file

@ -324,6 +324,14 @@ async function createApp(appType) {
app.use('/rest', reportsRest);
}
install404Fallback('/rest');
if (config.cas && config.cas.enabled === true) {
app.get('/cas/login',
passport.authenticateCas,
function(req, res) {
res.redirect('/?cas-login-success');
});
app.get('/cas/logout', passport.logoutCas);
}
}
app.use('/', await index.getRouter(appType));