mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
AuthN: Add IsAuthenticatedBy to identity interface and replace checks (#85262)
Add IsAuthenticatedBy to identity interface and replace checks
This commit is contained in:
@@ -129,7 +129,7 @@ func (hs *HTTPServer) LoginView(c *contextmodel.ReqContext) {
|
||||
// LDAP users authenticated by auth proxy are also assigned login token but their auth module is LDAP
|
||||
if hs.Cfg.AuthProxy.Enabled &&
|
||||
hs.Cfg.AuthProxy.EnableLoginToken &&
|
||||
(c.SignedInUser.AuthenticatedBy == loginservice.AuthProxyAuthModule || c.SignedInUser.AuthenticatedBy == loginservice.LDAPAuthModule) {
|
||||
c.SignedInUser.IsAuthenticatedBy(loginservice.AuthProxyAuthModule, loginservice.LDAPAuthModule) {
|
||||
user := &user.User{ID: c.SignedInUser.UserID, Email: c.SignedInUser.Email, Login: c.SignedInUser.Login}
|
||||
err := hs.loginUserWithUser(user, c)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user