Class ADInternalHybridUserSource

    • Method Detail

      • findUserInternalId

        protected java.lang.Long findUserInternalId​(PersistenceSession session,
                                                    User user)
        Our superclass stores the internal user id as the User object's id, but we don't. We store the username as the ID. This function looks up the internal database id of a user for the superclass's benefit.
        Overrides:
        findUserInternalId in class InternalUserSource
      • 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
        Overrides:
        authenticate in class InternalUserSource
        Returns:
        An AuthenticatedUser that contains the user's roles if authentication succeeded, or null if it did not.
        Throws:
        java.lang.Exception
      • getUsers

        @Nonnull
        public 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. Users from failover sources will be returned if hard failover is configured and triggered.
        Specified by:
        getUsers in interface UserSourceProfile
        Overrides:
        getUsers in class InternalUserSource
        Throws:
        java.lang.Exception
      • getUser

        @Nonnull
        public java.util.Optional<User> getUser​(java.lang.String userName)
                                         throws java.lang.Exception
        Description copied from interface: UserSourceProfile
        Fetch a User with the given user name. If more than one user exists with the given user name, the first user returned from the underlying data source is returned. Failover sources will be queried if hard failover is configured and the primary sources are unable to fetch the user due to an error. Failover sources will also be queried if soft failover is configured and the user is not found in the primary sources.
        Specified by:
        getUser in interface UserSourceProfile
        Overrides:
        getUser in class InternalUserSource
        Parameters:
        userName - the user name of the User to fetch
        Returns:
        an Optional User with the given user name. the user may be from a failover user source (check User.getProfileName() to confirm)
        Throws:
        java.lang.Exception - if there is an unexpected problem fetching the user with the given user name
        See Also:
        UserSourceProfile.getUser(String, String)
      • 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
      • setPopulateUsersOnDemand

        public void setPopulateUsersOnDemand​(boolean populateUsersOnDemand)
      • setListUsersFromAD

        public void setListUsersFromAD​(boolean listUsersFromAD)
      • setLdapHost

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

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

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

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

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

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

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

        public void setReadTimeout​(java.lang.Long readTimeOut)
      • setProfilePassword

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

        public void setUseSSL​(boolean useSsl)
      • setAllowAnon

        public void setAllowAnon​(boolean anon)
      • setSecurityAuthentication

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

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

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

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

        public void setUserNameAttribute​(java.lang.String userNameAttribute)
      • setFullNameAttribute

        public void setFullNameAttribute​(java.lang.String fullNameAttribute)
      • 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)