avoid unnecessary ldap bind for first user login
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -185,12 +185,14 @@ func ldapConnect() *ldap.Conn {
|
||||
InsecureSkipVerify: LdapInsecure,
|
||||
}
|
||||
|
||||
log.Printf("ldapConnect initiating connection\n")
|
||||
ldaps, err := ldap.DialTLS("tcp", LdapServer, tlsConfig)
|
||||
if err != nil {
|
||||
log.Printf("VerifyLdapCreds error connecting to LDAP bind address '%s' : '%s'\n", LdapServer, err)
|
||||
log.Printf("VerifyLdapCreds error connecting to LDAP server '%s' : '%s'\n", LdapServer, err)
|
||||
return nil
|
||||
}
|
||||
|
||||
log.Printf("ldapConnect connection succeeded\n")
|
||||
return ldaps
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user