I use Spring LDAP authentication via:
auth
.ldapAuthentication()
.userSearchFilter("userPrincipalName={0}")
.contextSource()
.managerDn(ldapAuthenticationConfig.getManagerDn())
.managerPassword(ldapAuthenticationConfig.getManagerPassword())
.url(ldapAuthenticationConfig.getUrl());
However, it takes too much time at login page when LDAP server is unavailable. I want to learn whether I can login or not within a considerable time.
Here is the dependency that I use:
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-ldap</artifactId>
</dependency>
How can I set a timeout value for LDAP authentication at Spring Boot?