Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion pkg/api/login.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,10 @@ func (hs *HTTPServer) LoginView(c *contextmodel.ReqContext) {
if c.IsSignedIn {
// Assign login token to auth proxy users if enable_login_token = true
// LDAP users authenticated by auth proxy are also assigned login token but their auth module is LDAP
// JWT validated users are also assigned a login token but come from the plain JWTModule
if hs.Cfg.AuthProxy.Enabled &&
hs.Cfg.AuthProxy.EnableLoginToken &&
c.IsAuthenticatedBy(loginservice.AuthProxyAuthModule, loginservice.LDAPAuthModule) {
c.IsAuthenticatedBy(loginservice.AuthProxyAuthModule, loginservice.LDAPAuthModule, loginservice.JWTModule) {
user := &user.User{ID: c.UserID, Email: c.Email, Login: c.Login}
err := hs.loginUserWithUser(user, c)
if err != nil {
Expand Down