(rebind bool)
| 215 | } |
| 216 | |
| 217 | func (ldap *LdapService) BindService(rebind bool) error { |
| 218 | // Locks must not be used for initial binding attempt |
| 219 | if rebind { |
| 220 | ldap.mutex.Lock() |
| 221 | defer ldap.mutex.Unlock() |
| 222 | } |
| 223 | |
| 224 | if ldap.cert != nil { |
| 225 | return ldap.conn.ExternalBind() |
| 226 | } |
| 227 | return ldap.conn.Bind(ldap.config.BindDN, ldap.config.BindPassword) |
| 228 | } |
| 229 | |
| 230 | func (ldap *LdapService) Bind(userDN string, password string) error { |
| 231 | ldap.mutex.Lock() |
no test coverage detected