chore (plg_authenticate_simple): additional debug info

This commit is contained in:
MickaelK
2024-12-05 22:46:59 +11:00
parent 8d70b7e26c
commit d56cdd3cc3
+14 -4
View File
@@ -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{