1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-08-05 13:55:21 +02:00

fix(auth): change error type

Co-Authored-By: chiptus <chiptus@users.noreply.github.com>
This commit is contained in:
Anthony Lapenna 2019-01-16 16:49:33 +02:00 committed by GitHub
parent 17ac3e5ed1
commit 44b7e0fdca
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -106,7 +106,7 @@ func (handler *Handler) authenticateOAuth(w http.ResponseWriter, r *http.Request
} }
if settings.AuthenticationMethod != 3 { if settings.AuthenticationMethod != 3 {
return &httperror.HandlerError{http.StatusForbidden, "OAuth authentication is not being used", err} return &httperror.HandlerError{http.StatusServiceUnavailable, "Authentication is not configured to use OAuth", err}
} }
token, err := handler.OAuthService.GetAccessToken(payload.Code, &settings.OAuthSettings) token, err := handler.OAuthService.GetAccessToken(payload.Code, &settings.OAuthSettings)