mirror of
https://github.com/pomerium/pomerium.git
synced 2025-05-09 15:17:39 +02:00
authenticate: fix impersonation getting cleared (#411)
This commit is contained in:
parent
edba21e0c9
commit
74cd9eabbb
6 changed files with 30 additions and 11 deletions
|
@ -142,7 +142,14 @@ func (a *Authenticate) SignIn(w http.ResponseWriter, r *http.Request) {
|
|||
return
|
||||
}
|
||||
|
||||
s.SetImpersonation(r.FormValue(urlutil.QueryImpersonateEmail), r.FormValue(urlutil.QueryImpersonateGroups))
|
||||
// user impersonation
|
||||
if impersonate := r.FormValue(urlutil.QueryImpersonateAction); impersonate != "" {
|
||||
s.SetImpersonation(r.FormValue(urlutil.QueryImpersonateEmail), r.FormValue(urlutil.QueryImpersonateGroups))
|
||||
if err := a.sessionStore.SaveSession(w, r, s); err != nil {
|
||||
httputil.ErrorResponse(w, r, httputil.Error(err.Error(), http.StatusBadRequest, err))
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
newSession := s.NewSession(a.RedirectURL.Host, jwtAudience)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue