diff --git a/server/plugin/plg_authenticate_simple/auth.go b/server/plugin/plg_authenticate_simple/auth.go index 5f815aed..f9cfde9e 100644 --- a/server/plugin/plg_authenticate_simple/auth.go +++ b/server/plugin/plg_authenticate_simple/auth.go @@ -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{