sessions: check idp id to detect provider changes to force session invalidation

This commit is contained in:
Caleb Doxsey 2022-10-25 14:23:06 -06:00
parent 3f7a482815
commit 6ceba8ed72
12 changed files with 265 additions and 175 deletions

View file

@ -111,9 +111,9 @@ func (a *Authenticate) mountDashboard(r *mux.Router) {
cr.Path("/").Handler(a.requireValidSignature(a.Callback)).Methods(http.MethodGet)
}
// RetrieveSession is the middleware used retrieve session by the sessionLoaders
// RetrieveSession is the middleware used retrieve session by the sessionLoader
func (a *Authenticate) RetrieveSession(next http.Handler) http.Handler {
return sessions.RetrieveSession(a.state.Load().sessionLoaders...)(next)
return sessions.RetrieveSession(a.state.Load().sessionLoader)(next)
}
// VerifySession is the middleware used to enforce a valid authentication