Skip to content

Commit

Permalink
Merge pull request openshift#134 from liggitt/error-logging
Browse files Browse the repository at this point in the history
add detail to internal error messages
  • Loading branch information
RangelReale authored Sep 24, 2016
2 parents f3e27ff + 813fe40 commit 839b9f1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions access.go
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ func (s *Server) handleAuthorizationCodeRequest(w *Response, r *http.Request) *A
// https://tools.ietf.org/html/rfc7636#section-4.1
if matched := pkceMatcher.MatchString(ret.CodeVerifier); !matched {
w.SetError(E_INVALID_REQUEST, "code_verifier invalid (rfc7636)")
w.InternalError = errors.New("invalid format")
w.InternalError = errors.New("code_verifier has invalid format")
return nil
}

Expand All @@ -250,7 +250,7 @@ func (s *Server) handleAuthorizationCodeRequest(w *Response, r *http.Request) *A
}
if codeVerifier != ret.AuthorizeData.CodeChallenge {
w.SetError(E_INVALID_GRANT, "code_verifier invalid (rfc7636)")
w.InternalError = errors.New("failed comparison with code_challenge")
w.InternalError = errors.New("code_verifier failed comparison with code_challenge")
return nil
}
}
Expand Down

0 comments on commit 839b9f1

Please sign in to comment.