set ldap auth
This commit is contained in:
@ -11,7 +11,7 @@ import (
|
||||
// LogIn auth the client
|
||||
func LogIn(username string, password string) (ok bool, user map[string]string) {
|
||||
|
||||
var configFile = "../server.conf"
|
||||
var configFile = "server.conf"
|
||||
var conf *config.Config
|
||||
var conferr error
|
||||
conf, conferr = config.NewFromFile(configFile)
|
||||
@ -30,6 +30,7 @@ func LogIn(username string, password string) (ok bool, user map[string]string) {
|
||||
GroupFilter: "(memberUid=%s)",
|
||||
Attributes: conf.LDAP.Attributes,
|
||||
}
|
||||
log.Print(ldapclient)
|
||||
defer ldapclient.Close()
|
||||
|
||||
ok, user, err := ldapclient.Authenticate(username, password)
|
||||
|
Reference in New Issue
Block a user