@@ -70,8 +70,8 @@ type OAuthProxy struct {
70
70
publicCertsJSON []byte
71
71
72
72
// these are required
73
- cookieCipher aead.Cipher
74
73
provider providers.Provider
74
+ cookieCipher aead.Cipher
75
75
upstreamConfig * UpstreamConfig
76
76
handler http.Handler
77
77
csrfStore sessions.CSRFStore
@@ -575,12 +575,13 @@ func (p *OAuthProxy) OAuthCallback(rw http.ResponseWriter, req *http.Request) {
575
575
p .StatsdClient .Incr ("application_error" , tags , 1.0 )
576
576
logger .WithRemoteAddress (remoteAddr ).WithUser (session .Email ).Info (
577
577
fmt .Sprintf ("permission denied: unauthorized: %q" , errors ))
578
+ // TODO: As is, the error page given to users provides no extra contract around what failed.
578
579
p .ErrorPage (rw , req , http .StatusForbidden , "Permission Denied" , "Account Validation Error" )
579
580
return
580
581
}
581
582
582
- logger .WithRemoteAddress (remoteAddr ).WithUser (session .Email ).Info (
583
- fmt .Sprintf ("oauth callback: user passed validation " ))
583
+ logger .WithRemoteAddress (remoteAddr ).WithUser (session .Email ).WithInGroups ( session . Groups ). Info (
584
+ fmt .Sprintf ("oauth callback: user validated " ))
584
585
585
586
// We store the session in a cookie and redirect the user back to the application
586
587
err = p .sessionStore .SaveSession (rw , req , session )
@@ -597,7 +598,6 @@ func (p *OAuthProxy) OAuthCallback(rw http.ResponseWriter, req *http.Request) {
597
598
598
599
// This is the redirect back to the original requested application
599
600
http .Redirect (rw , req , stateParameter .RedirectURI , http .StatusFound )
600
-
601
601
}
602
602
603
603
// AuthenticateOnly calls the Authenticate handler.
@@ -782,7 +782,7 @@ func (p *OAuthProxy) Authenticate(rw http.ResponseWriter, req *http.Request) (er
782
782
}
783
783
784
784
logger .WithRemoteAddress (remoteAddr ).WithUser (session .Email ).Info (
785
- fmt .Sprintf ("authentication: user passed validation " ))
785
+ fmt .Sprintf ("authentication: user validated " ))
786
786
787
787
for key , val := range p .upstreamConfig .InjectRequestHeaders {
788
788
req .Header .Set (key , val )
0 commit comments