You've already forked oauth2-proxy
mirror of
https://github.com/oauth2-proxy/oauth2-proxy.git
synced 2025-06-29 01:01:36 +02:00
Log the difference between invalid email and not authorized session (#2010)
* Log the difference between invalid email and not authorized session * Add changelog entry * Remove superfluous argument --------- Co-authored-by: Joel Speed <Joel.speed@hotmail.co.uk>
This commit is contained in:
committed by
GitHub
parent
487a0a5b99
commit
5d60177d3e
@ -1056,7 +1056,12 @@ func (p *OAuthProxy) getAuthenticatedSession(rw http.ResponseWriter, req *http.R
|
||||
}
|
||||
|
||||
if invalidEmail || !authorized {
|
||||
logger.PrintAuthf(session.Email, req, logger.AuthFailure, "Invalid authorization via session: removing session %s", session)
|
||||
cause := "unauthorized"
|
||||
if invalidEmail {
|
||||
cause = "invalid email"
|
||||
}
|
||||
|
||||
logger.PrintAuthf(session.Email, req, logger.AuthFailure, "Invalid authorization via session (%s): removing session %s", cause, session)
|
||||
// Invalid session, clear it
|
||||
err := p.ClearSessionCookie(rw, req)
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user