Interface UserSourceProfile
- 
- All Known Implementing Classes:
- AbstractUserSourceProfile,- ActiveDirectoryUserSource,- ADInternalHybridUserSource,- ADtoDBHybridAuthenticator,- DatabaseAutomaticUserSource,- DatabaseExpertUserSource,- InternalUserSource
 
 public interface UserSourceProfileA user management profile provides access to users, groups, and provides authentication verification for users. It may support editing of users and groups.
- 
- 
Field SummaryFields Modifier and Type Field Description static Property<java.lang.String>PWD_EXPIRATION_BYPASSBypass flag for auth requests that should not respect the password expiration setting of a user source.
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voidaddRole(java.lang.String roleName, UICallback ui)voidaddUser(User user, UICallback ui)voidalterPassword(User user, java.lang.String oldPassword, java.lang.String newPassword)voidalterUser(User user, UICallback ui)AuthenticatedUserauthenticate(AuthChallenge challenge)Called to both verify authentication for a given username/password pair, and to find the security roles for that user.longgetCacheValidationTimeout()The cache update time-out option.java.util.Set<UserSourceEditCapability>getEditFlags()Which of the editing functions are supported?java.lang.StringgetName()The name of this user profile.longgetProfileId()The ID of this user profiledefault java.util.Collection<java.lang.String>getRoles()java.util.Collection<java.lang.String>getRoles(boolean useFailover)java.util.Optional<User>getUser(java.lang.String userName)Fetch aUserwith the given user name.java.util.Optional<User>getUser(java.lang.String userName, java.lang.String userSourceProfileName)Fetch aUserwith the given user name and user source profile name.default java.util.Collection<User>getUsers()Retrieve all users from this profile.java.util.Collection<User>getUsers(boolean useFailover)Retrieve all users from this profile.voidremoveRole(java.lang.String roleName, UICallback ui)voidremoveUser(User user, UICallback ui)voidrenameRole(java.lang.String oldName, java.lang.String newName, UICallback ui)voidshutdown()Called either when the user source has been edited and so it is being restarted, or when the gateway is shutting down.voidstartup(UserSourceManager manager)Called when the user source is created before it is used.default java.lang.StringvalidatePassword(User user, java.lang.String password)Validate the given password.
 
- 
- 
- 
Field Detail- 
PWD_EXPIRATION_BYPASSstatic final Property<java.lang.String> PWD_EXPIRATION_BYPASS Bypass flag for auth requests that should not respect the password expiration setting of a user source. Used to verify a user's existing password during the reset phase.
 
- 
 - 
Method Detail- 
getProfileIdlong getProfileId() The ID of this user profile
 - 
getNamejava.lang.String getName() The name of this user profile.
 - 
getCacheValidationTimeoutlong getCacheValidationTimeout() The cache update time-out option.
 - 
authenticate@Nullable AuthenticatedUser authenticate(AuthChallenge challenge) throws java.lang.Exception Called to both verify authentication for a given username/password pair, and to find the security roles for that user.- Returns:
- An AuthenticatedUser that contains the user's roles if authentication succeeded, or null if it did not.
- Throws:
- PasswordExpiredException- if the user's password has expired and must be reset
- java.lang.Exception- if there was an unexpected problem encountered during authentication
 
 - 
startupvoid startup(UserSourceManager manager) Called when the user source is created before it is used.
 - 
shutdownvoid shutdown() Called either when the user source has been edited and so it is being restarted, or when the gateway is shutting down.
 - 
getUsers@Nonnull default java.util.Collection<User> getUsers() throws java.lang.Exception 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.- Throws:
- java.lang.Exception
 
 - 
getUsers@Nonnull java.util.Collection<User> getUsers(boolean useFailover) throws java.lang.Exception 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 when useFailover argument is true.- Throws:
- java.lang.Exception
 
 - 
getUserjava.util.Optional<User> getUser(java.lang.String userName) throws java.lang.Exception Fetch aUserwith 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.- Parameters:
- userName- the user name of the- Userto fetch
- Returns:
- an OptionalUserwith the given user name. the user may be from a failover user source (checkUser.getProfileName()to confirm)
- Throws:
- java.lang.Exception- if there is an unexpected problem fetching the user with the given user name
- See Also:
- getUser(String, String)
 
 - 
getUser@Nonnull java.util.Optional<User> getUser(java.lang.String userName, java.lang.String userSourceProfileName) throws java.lang.Exception Fetch aUserwith the given user name and user source profile name. If more than one user exists with the given user name, the first user returned from the underlying data source is returned. Tries to target the user source with the given userSourceProfileName argument in the chain of failover sources (if configured), following the rules of the failover mode that is currently set at each user source in the chain. While visiting each user source in the chain, the failover source will be queried if hard failover is configured and the primary source is unable to fetch the user due to an error, as long as the given userSourceProfileName argument does not match the primary user source name currently being queried, otherwise an empty result is returned. The failover source will also be queried if soft failover is configured and the given userSourceProfileName argument does not match the primary user source name currently being queried.- Parameters:
- userName- the user name of the- Userto fetch
- userSourceProfileName- the name of the user source profile for the target user
- Returns:
- an OptionalUserwith the given user name
- Throws:
- java.lang.Exception- if there is an unexpected problem fetching the user with the given user name
- See Also:
- getUser(String)
 
 - 
getRoles@Nonnull default java.util.Collection<java.lang.String> getRoles() throws java.lang.Exception- Returns:
- a collection of all possible role names for this profile. May be empty. Roles from failover sources will be returned if hard failover is configured and triggered.
- Throws:
- java.lang.Exception
 
 - 
getRoles@Nonnull java.util.Collection<java.lang.String> getRoles(boolean useFailover) throws java.lang.Exception- Returns:
- a collection of all possible role names for this profile. May be empty. Roles from failover sources will be returned if hard failover is configured and triggered when useFailover argument is true.
- Throws:
- java.lang.Exception
 
 - 
getEditFlagsjava.util.Set<UserSourceEditCapability> getEditFlags() Which of the editing functions are supported?
 - 
validatePassworddefault java.lang.String validatePassword(User user, java.lang.String password) Validate the given password. Note that this doesn't mean it checks to see if this password matches the user's current password. Rather, it means that this password would be an acceptable new password for the user.- Returns:
- A i18n key for the error message describing why the password is invalid, or null if the password is valid.
 
 - 
addRolevoid addRole(java.lang.String roleName, UICallback ui) throws java.lang.Exception- Throws:
- java.lang.Exception
 
 - 
removeRolevoid removeRole(java.lang.String roleName, UICallback ui) throws java.lang.Exception- Throws:
- java.lang.Exception
 
 - 
renameRolevoid renameRole(java.lang.String oldName, java.lang.String newName, UICallback ui) throws java.lang.Exception- Throws:
- java.lang.Exception
 
 - 
addUservoid addUser(User user, UICallback ui) throws java.lang.Exception - Throws:
- java.lang.Exception
 
 - 
alterUservoid alterUser(User user, UICallback ui) throws java.lang.Exception - Throws:
- java.lang.Exception
 
 - 
removeUservoid removeUser(User user, UICallback ui) throws java.lang.Exception - Throws:
- java.lang.Exception
 
 - 
alterPasswordvoid alterPassword(User user, java.lang.String oldPassword, java.lang.String newPassword) throws java.lang.Exception - Throws:
- java.lang.Exception
 
 
- 
 
-