Centralize logout method; delete OIDC sessions on logout

This commit is contained in:
2020-08-23 14:42:00 -05:00
parent d9c76e8dde
commit ff5ed6b39a
5 changed files with 34 additions and 8 deletions

View File

@@ -19,7 +19,6 @@ class SAMLController extends Controller {
})(req, res, next)
}
// TODO some sort of first-logon flow
async get_sso(req, res, next) {
const index = await req.saml.participants.issue({ service_provider: req.saml_request.service_provider })
@@ -71,7 +70,7 @@ class SAMLController extends Controller {
this.output.info(`${req.T('saml.clear_idp_session')} ${req.user.uid}`)
req.saml.participants.clear().then(async () => {
if ( this.saml.config().slo.end_coreid_session ) {
await req.user.get_provider().logout(req)
await req.user.logout(req)
// show logout page
return this.Vue.auth_message(res, {