Class AbstractLdapAuthenticationManagerFactory<T extends AbstractLdapAuthenticator>

    • Method Detail

      • setContextSource

        public void setContextSource​(org.springframework.ldap.core.support.BaseLdapPathContextSource contextSource)
        Sets the BaseLdapPathContextSource used to perform LDAP authentication.
        Parameters:
        contextSource - the BaseLdapPathContextSource used to perform LDAP authentication
      • getContextSource

        protected final org.springframework.ldap.core.support.BaseLdapPathContextSource getContextSource()
        Gets the BaseLdapPathContextSource used to perform LDAP authentication.
        Returns:
        the BaseLdapPathContextSource used to perform LDAP authentication
      • setUserDetailsContextMapper

        public void setUserDetailsContextMapper​(UserDetailsContextMapper userDetailsContextMapper)
        Sets a custom strategy to be used for creating the UserDetails which will be stored as the principal in the Authentication.
        Parameters:
        userDetailsContextMapper - the strategy instance
      • setUserDnPatterns

        public void setUserDnPatterns​(java.lang.String... userDnPatterns)
        If your users are at a fixed location in the directory (i.e. you can work out the DN directly from the username without doing a directory search), you can use this attribute to map directly to the DN. It maps directly to the userDnPatterns property of AbstractLdapAuthenticator. The value is a specific pattern used to build the user's DN, for example "uid={0},ou=people". The key "{0}" must be present and will be substituted with the username.
        Parameters:
        userDnPatterns - the LDAP patterns for finding the usernames
      • setUserSearchFilter

        public void setUserSearchFilter​(java.lang.String userSearchFilter)
        The LDAP filter used to search for users (optional). For example "(uid={0})". The substituted parameter is the user's login name.
        Parameters:
        userSearchFilter - the LDAP filter used to search for users
      • setUserSearchBase

        public void setUserSearchBase​(java.lang.String userSearchBase)
        Search base for user searches. Defaults to "". Only used with setUserSearchFilter(String).
        Parameters:
        userSearchBase - search base for user searches