mirror of
https://github.com/documize/community.git
synced 2025-07-24 15:49:44 +02:00
Provide better Keycloak aiuth failure msg
This commit is contained in:
parent
8cc6bf3d40
commit
4b543733e7
1 changed files with 2 additions and 0 deletions
|
@ -262,6 +262,7 @@ func (h *Handler) Authenticate(w http.ResponseWriter, r *http.Request) {
|
|||
// so we reject login request.
|
||||
if len(u.Accounts) == 0 {
|
||||
response.WriteUnauthorizedError(w)
|
||||
err = fmt.Errorf("no user accounts found for %s", u.Email)
|
||||
h.Runtime.Log.Error(method, err)
|
||||
return
|
||||
}
|
||||
|
@ -271,6 +272,7 @@ func (h *Handler) Authenticate(w http.ResponseWriter, r *http.Request) {
|
|||
if ac.OrgID == org.RefID {
|
||||
if ac.Active == false {
|
||||
response.WriteUnauthorizedError(w)
|
||||
err = fmt.Errorf("no ACTIVE user account found for %s", u.Email)
|
||||
h.Runtime.Log.Error(method, err)
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue