mirror of
https://github.com/pomerium/pomerium.git
synced 2025-07-02 17:38:27 +02:00
authenticate: don't require a session for sign_out (#4007)
authenticate: dont require a session for sign_out
This commit is contained in:
parent
7813623ba3
commit
3bb2ed6a2a
1 changed files with 6 additions and 1 deletions
|
@ -86,11 +86,16 @@ func (a *Authenticate) mountDashboard(r *mux.Router) {
|
|||
AllowedHeaders: []string{"*"},
|
||||
})
|
||||
sr.Use(c.Handler)
|
||||
|
||||
// routes that don't need a session:
|
||||
sr.Path("/sign_out").Handler(httputil.HandlerFunc(a.SignOut))
|
||||
|
||||
// routes that need a session:
|
||||
sr = sr.NewRoute().Subrouter()
|
||||
sr.Use(a.RetrieveSession)
|
||||
sr.Use(a.VerifySession)
|
||||
sr.Path("/").Handler(a.requireValidSignatureOnRedirect(a.userInfo))
|
||||
sr.Path("/sign_in").Handler(httputil.HandlerFunc(a.SignIn))
|
||||
sr.Path("/sign_out").Handler(httputil.HandlerFunc(a.SignOut))
|
||||
sr.Path("/device-enrolled").Handler(httputil.HandlerFunc(func(w http.ResponseWriter, r *http.Request) error {
|
||||
userInfoData, err := a.getUserInfoData(r)
|
||||
if err != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue