public class AppianUserDetailsService
extends java.lang.Object
implements org.springframework.security.core.userdetails.UserDetailsService
UserProfileService
and returns an instance of
AppianUserDetails
.Constructor and Description |
---|
AppianUserDetailsService()
Creates a new configured instance by calling
AppianUserDetailsService(boolean) and passing
true . |
AppianUserDetailsService(boolean applyPasswordManagement)
Creates a new configured instance.
|
Modifier and Type | Method and Description |
---|---|
static PasswordStatus |
calculatePasswordStatus(UserProfile user)
Calculates the password status using the Password Management feature configurations and the user
metadata
User.isTemporaryPassword() and User.getPasswordModified() . |
AppianUserDetails |
getUserDetails(UserProfile user)
Creates a new
AppianUserDetails instance populated using the given Appian user metadata. |
AppianUserDetails |
getUserDetails(UserProfile user,
java.util.Set<java.lang.String> userRoles)
Deprecated.
Use
getUserDetails(UserProfile) instead. |
AppianUserDetails |
getUserDetailsLazy(java.lang.String username)
Creates a new
AppianUserDetails instance populated using the given username. |
boolean |
isApplyPasswordManagement()
Deprecated.
|
protected boolean |
isApplyPasswordManagement(java.lang.String username)
Override this method to dynamically specify whether password management should be applied for a given
user.
|
AppianUserDetails |
loadUserByUsername(java.lang.String username)
Retrieves the Appian user metadata using
UserProfileService and creates a new
AppianUserDetails instance using getUserDetails(UserProfile) . |
public AppianUserDetailsService()
AppianUserDetailsService(boolean)
and passing
true
.public AppianUserDetailsService(boolean applyPasswordManagement)
applyPasswordManagement
- If set to true
, the password status of the
AppianUserDetails
bean returned by loadUserByUsername(String)
will be
calculated using calculatePasswordStatus(UserProfile)
. If set to false
,
the password status will always be set to PasswordStatus.NORMAL
.@Deprecated public boolean isApplyPasswordManagement()
isApplyPasswordManagement(String)
protected boolean isApplyPasswordManagement(java.lang.String username)
username
- The user for which to return whether password management should be applied.true
if password management should be applied for the given user.public AppianUserDetails loadUserByUsername(java.lang.String username) throws org.springframework.security.core.userdetails.UsernameNotFoundException
UserProfileService
and creates a new
AppianUserDetails
instance using getUserDetails(UserProfile)
.loadUserByUsername
in interface org.springframework.security.core.userdetails.UserDetailsService
org.springframework.security.core.userdetails.UsernameNotFoundException
public AppianUserDetails getUserDetails(UserProfile user)
AppianUserDetails
instance populated using the given Appian user metadata.
If isApplyPasswordManagement()
is set to true
, sets the
password status
using
calculatePasswordStatus(UserProfile)
. Otherwise, sets the password status to
PasswordStatus.NORMAL
.user
- The Appian user metadata.public AppianUserDetails getUserDetailsLazy(java.lang.String username)
AppianUserDetails
instance populated using the given username. The returned user
details bean is "lazy" -- the Appian user metadata
and the
password status
for the user are not loaded until the first
call to these getters.
Use this method when you only have a username since retrieving a UserProfile object is comparatively
expensive.username
- The username.@Deprecated public AppianUserDetails getUserDetails(UserProfile user, java.util.Set<java.lang.String> userRoles)
getUserDetails(UserProfile)
instead.AppianUserDetails
instance populated using the given Appian user metadata.
If isApplyPasswordManagement()
is set to true
, sets the
password status
using
calculatePasswordStatus(UserProfile)
. Otherwise, sets the password status to
PasswordStatus.NORMAL
.user
- The Appian user metadata.userRoles
- The roles of the user.public static PasswordStatus calculatePasswordStatus(UserProfile user)
User.isTemporaryPassword()
and User.getPasswordModified()
.user
- The Appian user metadata.Copyright © 2003-2024 Appian Corporation. All Rights Reserved.