mirror of
https://github.com/grafana/grafana.git
synced 2025-08-01 08:33:00 +08:00
Feature: LDAP refactoring (#16950)
* incapsulates multipleldap logic under one module * abstracts users upsert and get logic * changes some of the text error messages and import sort sequence * heavily refactors the LDAP module – LDAP module now only deals with LDAP related behaviour * integrates affected auth_proxy module and their tests * refactoring of the auth_proxy logic
This commit is contained in:
@ -35,8 +35,8 @@ func initContextWithAuthProxy(store *remotecache.RemoteCache, ctx *m.ReqContext,
|
||||
return true
|
||||
}
|
||||
|
||||
// Try to get user id from various sources
|
||||
id, err := auth.GetUserID()
|
||||
// Try to log in user from various providers
|
||||
id, err := auth.Login()
|
||||
if err != nil {
|
||||
ctx.Handle(500, err.Error(), err.DetailsError)
|
||||
return true
|
||||
@ -54,7 +54,7 @@ func initContextWithAuthProxy(store *remotecache.RemoteCache, ctx *m.ReqContext,
|
||||
ctx.IsSignedIn = true
|
||||
|
||||
// Remember user data it in cache
|
||||
if err := auth.Remember(); err != nil {
|
||||
if err := auth.Remember(id); err != nil {
|
||||
ctx.Handle(500, err.Error(), err.DetailsError)
|
||||
return true
|
||||
}
|
||||
|
Reference in New Issue
Block a user