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

    Constructors
    Constructor
    Description
    LdapAuthenticationProvider(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 Type
    Method
    Description
    org.springframework.security.core.Authentication
    authenticate(org.springframework.security.core.Authentication authentication)
     
     
     
    void
    setExternalIdAttribute(String externalIdAttribute)
     

    Methods inherited from class org.springframework.security.ldap.authentication.LdapAuthenticationProvider

    doAuthentication, getAuthoritiesPopulator, loadUserAuthorities, setHideUserNotFoundExceptions

    Methods inherited from class org.springframework.security.ldap.authentication.AbstractLdapAuthenticationProvider

    createSuccessfulAuthentication, getUserDetailsContextMapper, setAuthoritiesMapper, setMessageSource, setUseAuthenticationRequestCredentials, setUserDetailsContextMapper, supports

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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:
      authenticate in interface org.springframework.security.authentication.AuthenticationProvider
      Overrides:
      authenticate in class org.springframework.security.ldap.authentication.AbstractLdapAuthenticationProvider
      Throws:
      org.springframework.security.core.AuthenticationException
    • getGroupEmailProvider

      public LdapGroupEmailProvider getGroupEmailProvider()
    • getExternalIdAttribute

      public String getExternalIdAttribute()
    • setExternalIdAttribute

      public void setExternalIdAttribute(String externalIdAttribute)