Class ProxyLdapUserSearch

  • All Implemented Interfaces:
    org.springframework.security.ldap.search.LdapUserSearch

    public final class ProxyLdapUserSearch
    extends Object
    implements org.springframework.security.ldap.search.LdapUserSearch
    Proxy LdapUserSearch implementation that delegates to the supplied list of LdapUserSearch implementations. A user is authenticated if at least one of the delegates can authenticate the user. If none of the delegates can authenticate the user UsernameNotFoundException is thrown. The delegates are asked in the same order as they were supplied to the constructor.
    Since:
    6.0
    • Constructor Detail

      • ProxyLdapUserSearch

        public ProxyLdapUserSearch​(List<? extends org.springframework.security.ldap.search.LdapUserSearch> delegates)
    • Method Detail

      • searchForUser

        public org.springframework.ldap.core.DirContextOperations searchForUser​(String username)
                                                                         throws org.springframework.security.core.userdetails.UsernameNotFoundException
        Specified by:
        searchForUser in interface org.springframework.security.ldap.search.LdapUserSearch
        Throws:
        org.springframework.security.core.userdetails.UsernameNotFoundException