Merge pull request #1530 from dexidp/ldap-error

connector/ldap: display login error
This commit is contained in:
Stephan Renatus 2019-08-23 12:32:23 +02:00 committed by GitHub
commit 133c2565be
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -373,7 +373,7 @@ func (s *Server) handleConnectorLogin(w http.ResponseWriter, r *http.Request) {
identity, ok, err := passwordConnector.Login(r.Context(), scopes, username, password) identity, ok, err := passwordConnector.Login(r.Context(), scopes, username, password)
if err != nil { if err != nil {
s.logger.Errorf("Failed to login user: %v", err) s.logger.Errorf("Failed to login user: %v", err)
s.renderError(w, http.StatusInternalServerError, "Login error.") s.renderError(w, http.StatusInternalServerError, fmt.Sprintf("Login error: %v", err))
return return
} }
if !ok { if !ok {