mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-18 22:49:52 +02:00
oidc: use 'end_session_endpoint' from discovery, remove 'OIDC_LOGOUT_URL'
This commit is contained in:
@@ -80,11 +80,12 @@ func (amw *oidcMiddleware) before(w http.ResponseWriter, r *http.Request) (proce
|
||||
return false
|
||||
}
|
||||
|
||||
if r.URL.Path == auth.OIDCLogoutPath {
|
||||
amw.auth.LogoutCallbackHandler(w, r)
|
||||
}
|
||||
if err := amw.auth.CheckToken(r); err != nil {
|
||||
if errors.Is(err, auth.ErrMissingToken) {
|
||||
amw.authMux.ServeHTTP(w, r)
|
||||
} else if r.URL.Path == auth.OIDCLogoutPath {
|
||||
amw.auth.LogoutCallbackHandler(w, r)
|
||||
} else {
|
||||
auth.WriteBlockPage(w, http.StatusForbidden, err.Error(), auth.OIDCLogoutPath)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user