Skip to content
This repository has been archived by the owner on Jul 30, 2024. It is now read-only.

Commit

Permalink
fix authentication incomplete case of authentication handler
Browse files Browse the repository at this point in the history
  • Loading branch information
freisenhauer-mittwald committed Aug 8, 2023
1 parent 8409ac8 commit afd2b80
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions auth/rest.go
Original file line number Diff line number Diff line change
Expand Up @@ -225,11 +225,12 @@ func (a *RestAuthDecorator) RegisterRoutes(mux *httprouter.Router) error {
rw.WriteHeader(403)
_, _ = rw.Write([]byte(`{"msg":"invalid credentials"}`))
return
} else if errors.Is(err, &AuthenticationIncompleteError{}) {
if err = handleIncompleteAuthentication(err.(*AuthenticationIncompleteError), rw); err != nil {
handleError(err, rw)
} else if errors.Is(err, AuthenticationIncompleteError{}) {
if innerErr := handleIncompleteAuthentication(err.(*AuthenticationIncompleteError), rw); innerErr != nil {
handleError(innerErr, rw)
return
}
return
} else if err != nil || authResponse == nil {
handleError(err, rw)
return
Expand Down

0 comments on commit afd2b80

Please sign in to comment.