Class LdapAuthenticationProvider
java.lang.Object
org.springframework.security.ldap.authentication.AbstractLdapAuthenticationProvider
org.springframework.security.ldap.authentication.LdapAuthenticationProvider
com.xebialabs.xlrelease.security.authentication.LdapAuthenticationProvider
- All Implemented Interfaces:
org.springframework.beans.factory.Aware,org.springframework.context.MessageSourceAware,org.springframework.security.authentication.AuthenticationProvider
public class LdapAuthenticationProvider
extends org.springframework.security.ldap.authentication.LdapAuthenticationProvider
Since spring security 3.2.0, internal authentication exception stops the authentication: https://jira.spring.io/browse/SEC-2367.
But if LDAP authentication fails due to LDAP communication issue, we want to try internal authentication.
-
Field Summary
Fields inherited from class org.springframework.security.ldap.authentication.AbstractLdapAuthenticationProvider
logger, messages, userDetailsContextMapper -
Constructor Summary
ConstructorsConstructorDescriptionLdapAuthenticationProvider(org.springframework.security.ldap.authentication.LdapAuthenticator authenticator) LdapAuthenticationProvider(org.springframework.security.ldap.authentication.LdapAuthenticator authenticator, org.springframework.security.ldap.userdetails.LdapAuthoritiesPopulator authoritiesPopulator) LdapAuthenticationProvider(org.springframework.security.ldap.authentication.LdapAuthenticator authenticator, org.springframework.security.ldap.userdetails.LdapAuthoritiesPopulator authoritiesPopulator, LdapGroupEmailProvider groupEmailProvider) -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.security.core.Authenticationauthenticate(org.springframework.security.core.Authentication authentication) voidsetExternalIdAttribute(String externalIdAttribute) Methods inherited from class org.springframework.security.ldap.authentication.LdapAuthenticationProvider
doAuthentication, getAuthoritiesPopulator, loadUserAuthorities, setHideUserNotFoundExceptionsMethods inherited from class org.springframework.security.ldap.authentication.AbstractLdapAuthenticationProvider
createSuccessfulAuthentication, getUserDetailsContextMapper, setAuthoritiesMapper, setMessageSource, setUseAuthenticationRequestCredentials, setUserDetailsContextMapper, supports
-
Constructor Details
-
LdapAuthenticationProvider
public LdapAuthenticationProvider(org.springframework.security.ldap.authentication.LdapAuthenticator authenticator, org.springframework.security.ldap.userdetails.LdapAuthoritiesPopulator authoritiesPopulator, LdapGroupEmailProvider groupEmailProvider) -
LdapAuthenticationProvider
public LdapAuthenticationProvider(org.springframework.security.ldap.authentication.LdapAuthenticator authenticator, org.springframework.security.ldap.userdetails.LdapAuthoritiesPopulator authoritiesPopulator) -
LdapAuthenticationProvider
public LdapAuthenticationProvider(org.springframework.security.ldap.authentication.LdapAuthenticator authenticator)
-
-
Method Details
-
authenticate
public org.springframework.security.core.Authentication authenticate(org.springframework.security.core.Authentication authentication) throws org.springframework.security.core.AuthenticationException - Specified by:
authenticatein interfaceorg.springframework.security.authentication.AuthenticationProvider- Overrides:
authenticatein classorg.springframework.security.ldap.authentication.AbstractLdapAuthenticationProvider- Throws:
org.springframework.security.core.AuthenticationException
-
getGroupEmailProvider
-
getExternalIdAttribute
-
setExternalIdAttribute
-