1
0
mirror of https://github.com/oauth2-proxy/oauth2-proxy.git synced 2025-06-15 00:15:00 +02:00

Fixed linting errors.

This commit is contained in:
MisterWil
2019-02-15 10:07:25 -08:00
parent 37c415b889
commit c22731afa0
2 changed files with 58 additions and 50 deletions

View File

@ -905,6 +905,9 @@ func (p *OAuthProxy) Authenticate(rw http.ResponseWriter, req *http.Request) int
if session == nil {
session, err = p.CheckBasicAuth(req)
if err != nil {
logger.Printf("Error during basic auth validation: %s", err)
}
}
if session == nil {
@ -983,7 +986,7 @@ func (p *OAuthProxy) CheckBasicAuth(req *http.Request) (*providers.SessionState,
return &providers.SessionState{User: pair[0]}, nil
}
logger.PrintAuthf(pair[0], req, logger.AuthFailure, "Invalid authentication via basic auth; not in Htpasswd File")
return nil, fmt.Errorf("%s not in HtpasswdFile", pair[0])
return nil, nil
}
// isAjax checks if a request is an ajax request