Skip to content

Commit

Permalink
fix: improve saml assertion logging (#1915)
Browse files Browse the repository at this point in the history
## What kind of change does this PR introduce?
* Logs the `Response` returned from the library as well
  • Loading branch information
kangmingtay authored Jan 22, 2025
1 parent a4c692f commit d6030cc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/api/samlacs.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ func (a *API) handleSamlAcs(w http.ResponseWriter, r *http.Request) error {
spAssertion, err := serviceProvider.ParseResponse(r, requestIds)
if err != nil {
if ire, ok := err.(*saml.InvalidResponseError); ok {
return badRequestError(ErrorCodeValidationFailed, "SAML Assertion is not valid").WithInternalError(ire.PrivateErr)
return badRequestError(ErrorCodeValidationFailed, "SAML Assertion is not valid %s", ire.Response).WithInternalError(ire.PrivateErr)
}

return badRequestError(ErrorCodeValidationFailed, "SAML Assertion is not valid").WithInternalError(err)
Expand Down

0 comments on commit d6030cc

Please sign in to comment.