diff --git a/infrastructure/auth_connector/ldap.go b/infrastructure/auth_connector/ldap.go index 1cf1030..62175cd 100644 --- a/infrastructure/auth_connector/ldap.go +++ b/infrastructure/auth_connector/ldap.go @@ -374,10 +374,10 @@ func (cli *Client) findRoles(cn conn, attrs ...string) (map[string]LDAPRoles, er // findBasicUserDetails finds user's LDAP attributes that were specified. It returns nil if no such user. func (cli *Client) findBasicUserDetails(cn conn, username string, attrs []string) (map[string][]string, error) { - fmt.Println("Second woth : ", cli.BindDN, cli.BindPass) - if cli.BindDN != "" { + fmt.Println("Second woth : ", cli.UserBaseDN, cli.BindPass) + if cli.UserBaseDN != "" { // We need to login to a LDAP server with a service account for retrieving user data. - if err := cn.Bind(cli.BindDN, cli.BindPass); err != nil { + if err := cn.Bind(cli.UserBaseDN, cli.BindPass); err != nil { return nil, errors.New(err.Error() + " : failed to login to a LDAP woth a service account") } }