diff --git a/infrastructure/auth_connector/ldap.go b/infrastructure/auth_connector/ldap.go index 1d35ade..f35322d 100644 --- a/infrastructure/auth_connector/ldap.go +++ b/infrastructure/auth_connector/ldap.go @@ -86,7 +86,6 @@ func (cli *Client) Authenticate(ctx context.Context, username string, password s if username == "" || password == "" { return false, nil } - var cancel context.CancelFunc ctx, cancel = context.WithCancel(ctx) fmt.Println("Connect", ctx, username, password) @@ -102,9 +101,12 @@ func (cli *Client) Authenticate(ctx context.Context, username string, password s if err != nil || details == nil { return false, err } + fmt.Println(details) a := details["dn"] + fmt.Println(a) log.Println("Binding DN:", a[0], "with password:", password) if err := cn.Bind(a[0], password); err != nil { + fmt.Println(err) if err == errInvalidCredentials { return false, nil }