diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2014-05-11 14:12:45 +0800 |
---|---|---|
committer | Lunny Xiao <xiaolunwen@gmail.com> | 2014-05-11 14:12:45 +0800 |
commit | 55019bfbc5c2b7db7a1f861a90d97e6760433e4d (patch) | |
tree | 07a3ecf9e82b942b3428f0eaa7cce947dce743e8 /modules/auth/ldap | |
parent | 4d6de6c7b9715a6ccce3f09249b47b984b9a1295 (diff) | |
parent | 7d84cc96e8da9f7389f855be4f86864039843e6c (diff) |
merge all login methods
Diffstat (limited to 'modules/auth/ldap')
-rw-r--r-- | modules/auth/ldap/ldap.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/auth/ldap/ldap.go b/modules/auth/ldap/ldap.go index 8578e38a..493339cd 100644 --- a/modules/auth/ldap/ldap.go +++ b/modules/auth/ldap/ldap.go @@ -42,7 +42,7 @@ func AddSource(name string, host string, port int, basedn string, attributes str func LoginUser(name, passwd string) (a string, r bool) { r = false for _, ls := range Authensource { - a, r = ls.searchEntry(name, passwd) + a, r = ls.SearchEntry(name, passwd) if r { return } @@ -51,7 +51,7 @@ func LoginUser(name, passwd string) (a string, r bool) { } // searchEntry : search an LDAP source if an entry (name, passwd) is valide and in the specific filter -func (ls Ldapsource) searchEntry(name, passwd string) (string, bool) { +func (ls Ldapsource) SearchEntry(name, passwd string) (string, bool) { l, err := goldap.Dial("tcp", fmt.Sprintf("%s:%d", ls.Host, ls.Port)) if err != nil { log.Debug("LDAP Connect error, disabled source %s", ls.Host) |