feat: logout by auth strategy + keycloak implementation

This commit is contained in:
NGPixel
2020-09-01 20:01:25 -04:00
parent cda1f1e805
commit 062a0b7979
6 changed files with 87 additions and 11 deletions

View File

@@ -42,5 +42,15 @@ module.exports = {
}
})
)
},
logout (conf) {
if (!conf.logoutUpstream) {
return '/'
} else if (conf.logoutURL && conf.logoutURL.length > 5) {
return `${conf.logoutURL}?redirect_uri=${encodeURIComponent(WIKI.config.host)}`
} else {
WIKI.logger.warn('Keycloak logout URL is not configured!')
return '/'
}
}
}