Skip to content

Commit

Permalink
Log error when token introspection fails
Browse files Browse the repository at this point in the history
  • Loading branch information
vasayxtx committed Oct 31, 2024
1 parent cd4181a commit d88188e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions middleware.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,9 @@ func (h *jwtAuthHandler) ServeHTTP(rw http.ResponseWriter, r *http.Request) {
log.Error(err))
}
default:
if logger != nil {
logger.Error("token introspection failed", log.Error(err))
}
apiErr := restapi.NewError(h.errorDomain, ErrCodeAuthenticationFailed, ErrMessageAuthenticationFailed)
restapi.RespondError(rw, http.StatusUnauthorized, apiErr, logger)
return
Expand Down

0 comments on commit d88188e

Please sign in to comment.