aboutsummaryrefslogtreecommitdiffstats
path: root/modules/auth/ldap
diff options
context:
space:
mode:
authorUnknwon <joe2010xtmf@163.com>2014-09-07 20:04:47 -0400
committerUnknwon <joe2010xtmf@163.com>2014-09-07 20:04:47 -0400
commit59a7c7c5a530cead1905c0c686869ea0f6a7949c (patch)
tree00e1e6a987b9fd032e24b2edd1603a0a711f3878 /modules/auth/ldap
parent25d6ae69d1cb392922b9d9dc0da1c17aef9a9db2 (diff)
downloadgitea-59a7c7c5a530cead1905c0c686869ea0f6a7949c.tar.gz
gitea-59a7c7c5a530cead1905c0c686869ea0f6a7949c.zip
Remove ldap dep
Diffstat (limited to 'modules/auth/ldap')
-rw-r--r--modules/auth/ldap/ldap.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/modules/auth/ldap/ldap.go b/modules/auth/ldap/ldap.go
index e27e5133ed..79b59519e2 100644
--- a/modules/auth/ldap/ldap.go
+++ b/modules/auth/ldap/ldap.go
@@ -9,8 +9,8 @@ package ldap
import (
"fmt"
+ "github.com/gogits/gogs/modules/ldap"
"github.com/gogits/gogs/modules/log"
- goldap "github.com/juju2013/goldap"
)
// Basic LDAP authentication service
@@ -68,9 +68,9 @@ func (ls Ldapsource) SearchEntry(name, passwd string) (string, bool) {
return "", false
}
- search := goldap.NewSearchRequest(
+ search := ldap.NewSearchRequest(
ls.BaseDN,
- goldap.ScopeWholeSubtree, goldap.NeverDerefAliases, 0, 0, false,
+ ldap.ScopeWholeSubtree, ldap.NeverDerefAliases, 0, 0, false,
fmt.Sprintf(ls.Filter, name),
[]string{ls.Attributes},
nil)
@@ -87,10 +87,10 @@ func (ls Ldapsource) SearchEntry(name, passwd string) (string, bool) {
return "", true
}
-func ldapDial(ls Ldapsource) (*goldap.Conn, error) {
+func ldapDial(ls Ldapsource) (*ldap.Conn, error) {
if ls.UseSSL {
- return goldap.DialTLS("tcp", fmt.Sprintf("%s:%d", ls.Host, ls.Port), nil)
+ return ldap.DialTLS("tcp", fmt.Sprintf("%s:%d", ls.Host, ls.Port), nil)
} else {
- return goldap.Dial("tcp", fmt.Sprintf("%s:%d", ls.Host, ls.Port))
+ return ldap.Dial("tcp", fmt.Sprintf("%s:%d", ls.Host, ls.Port))
}
}