Class ActiveDirectoryUserSource

    • Field Detail

      • DEFAULT_USER_SEARCH_FILTER

        public static final java.lang.String DEFAULT_USER_SEARCH_FILTER
        Default user search filter for looking for a single user
        See Also:
        Constant Field Values
      • DEFAULT_USER_LIST_FILTER

        public static final java.lang.String DEFAULT_USER_LIST_FILTER
        Default group search filter for finding all users
        See Also:
        Constant Field Values
      • DEFAULT_ROLE_LIST_FILTER

        public static final java.lang.String DEFAULT_ROLE_LIST_FILTER
        Default group search filter for finding all groups
        See Also:
        Constant Field Values
    • Method Detail

      • getUsers

        @NotNull
        public @NotNull java.util.Collection<User> getUsers()
                                                     throws java.lang.Exception
        Description copied from interface: UserSourceProfile
        Retrieve all users from this profile. This can execute slowly (block) if need be. It will be called periodically by the manager and the results will be cached.
        Specified by:
        getUsers in interface UserSourceProfile
        Throws:
        java.lang.Exception
      • authenticate

        public AuthenticatedUser authenticate​(AuthChallenge challenge)
                                       throws java.lang.Exception
        Description copied from interface: UserSourceProfile
        Called to both verify authentication for a given username/password pair, and to find the security roles for that user.
        Specified by:
        authenticate in interface UserSourceProfile
        Returns:
        An AuthenticatedUser that contains the user's roles if authentication succeeded, or null if it did not.
        Throws:
        java.lang.Exception
      • findSSOUser

        public User findSSOUser​(java.lang.String uname)
                         throws java.lang.Exception
        Description copied from interface: SSOCompatibleADUserSource
        Used by the SSO helper in order to search for a user with a given username. Return null if no user with this username is found.
        Specified by:
        findSSOUser in interface SSOCompatibleADUserSource
        Throws:
        java.lang.Exception
      • getRoles

        @NotNull
        public @NotNull java.util.Collection<java.lang.String> getRoles()
                                                                 throws java.lang.Exception
        Specified by:
        getRoles in interface UserSourceProfile
        Returns:
        a collection of all possible role names for this profile. May be empty
        Throws:
        java.lang.Exception
      • main

        public static void main​(java.lang.String[] args)
      • setLdapHost

        public void setLdapHost​(java.lang.String ldapHost)
      • setLdapPort

        public void setLdapPort​(java.lang.String ldapPort)
      • setProfilePassword

        public void setProfilePassword​(java.lang.String profilePassword)
      • setProfileUsername

        public void setProfileUsername​(java.lang.String profileUsername)
      • setRoleSearchBase

        public void setRoleSearchBase​(java.lang.String roleSearchBase)
      • setRoleSearchFilter

        public void setRoleSearchFilter​(java.lang.String roleSearchFilter)
      • setSecondaryLdapHost

        public void setSecondaryLdapHost​(java.lang.String secondaryLdapHost)
      • setSecondaryLdapPort

        public void setSecondaryLdapPort​(java.lang.String secondaryLdapPort)
      • setUserNameAttribute

        public void setUserNameAttribute​(java.lang.String usernameAttribute)
      • setUsernamePrefix

        public void setUsernamePrefix​(java.lang.String usernamePrefix)
      • setUsernameSuffix

        public void setUsernameSuffix​(java.lang.String usernameSuffix)
      • setUseSSL

        public void setUseSSL​(boolean useSsl)
      • setAllowAnon

        public void setAllowAnon​(boolean anon)
      • setSecurityAuthentication

        public void setSecurityAuthentication​(LDAPHelper.AuthType securityAuthentication)
      • setReadTimeout

        public void setReadTimeout​(java.lang.Long readTimeout)
      • setUserSearchBase

        public void setUserSearchBase​(java.lang.String userSearchBase)
      • setUserSearchFilter

        public void setUserSearchFilter​(java.lang.String userSearchFilter)
      • setUserListFilter

        public void setUserListFilter​(java.lang.String userListFilter)
      • setRoleNameAttribute

        public void setRoleNameAttribute​(java.lang.String roleNameAttribute)
      • setFullNameAttribute

        public void setFullNameAttribute​(java.lang.String fullNameAttribute)
      • setUserRoleAttribute

        public void setUserRoleAttribute​(java.lang.String userRoleAttribute)
      • setEmailAttribute

        public void setEmailAttribute​(java.lang.String emailAttribute)
      • setPhoneAttribute

        public void setPhoneAttribute​(java.lang.String phoneAttribute)
      • setSmsAttribute

        public void setSmsAttribute​(java.lang.String smsAttribute)
      • setPageSize

        public void setPageSize​(int size)
      • setSSOEnabled

        public void setSSOEnabled​(boolean enabled)
      • setSSODomain

        public void setSSODomain​(java.lang.String ssoDomain)
      • setSaslConfig

        public void setSaslConfig​(SASLConfig saslConfig)