mirror of
https://github.com/mickael-kerjean/filestash.git
synced 2026-10-19 16:14:39 +00:00
chore (plg_authenticate_simple): additional debug info
This commit is contained in:
@@ -119,11 +119,21 @@ func (this SimpleAuth) Callback(formData map[string]string, idpParams map[string
|
||||
Log.Warning("plg_authentication_simple::auth action=authenticate email=%s err=disabled", users[i].Email)
|
||||
return nil, ErrAuthenticationFailed
|
||||
}
|
||||
return map[string]string{
|
||||
"user": users[i].Email,
|
||||
"password": users[i].Password,
|
||||
session := map[string]string{
|
||||
"user": formData["email"],
|
||||
"password": formData["password"],
|
||||
"bcrypt": users[i].Password,
|
||||
"role": users[i].Role,
|
||||
}, nil
|
||||
}
|
||||
s := ""
|
||||
for k, v := range session {
|
||||
if k == "password" || k == "bcrypt" {
|
||||
v = "*****"
|
||||
}
|
||||
s += fmt.Sprintf("%s[%s] ", k, v)
|
||||
}
|
||||
Log.Debug("IDP Attributes => %s", s)
|
||||
return session, nil
|
||||
}
|
||||
|
||||
http.SetCookie(res, &http.Cookie{
|
||||
|
||||
Reference in New Issue
Block a user