public class AppianUserDetails
extends java.lang.Object
implements com.appiancorp.suiteapi.security.auth.UserDetailsAndSecurityContext
UserDetails
interface and holds Appian-specific data about a user.
Use AppianUserDetailsService
to get an instance of this class.
Constructor and Description |
---|
AppianUserDetails(java.lang.String username,
com.appiancorp.security.auth.GroupMembershipInfoProvider groupMembershipInfoProvider)
Constructor to use when you only have the username since calling to retrieve a UserProfile object is comparatively expensive.
|
AppianUserDetails(UserProfile userProfile,
com.appiancorp.security.auth.GroupMembershipInfoProvider groupMembershipInfoProvider,
PasswordStatus passwordStatus) |
AppianUserDetails(UserProfile userProfile,
PasswordStatus passwordStatus,
java.util.Set<java.lang.String> roles)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
void |
clearEncryptedSamlAssertion()
Clear cached saml assertion once we are done consuming it.
|
boolean |
equals(java.lang.Object obj)
Returns
true if the given object is an instance of AppianUserDetails and
has the same username as this object. |
com.appiancorp.security.auth.AppianLoginContext |
getAppianLoginContext()
Returns SSO specific login context that is used internally.
|
java.util.Collection<org.springframework.security.core.GrantedAuthority> |
getAuthorities()
Returns this user's roles.
|
java.lang.String |
getEncryptedSamlAssertion()
Holds encrypted saml assertion used to authenticate user when they logged
in via saml.
|
java.lang.String |
getGrantorName() |
java.util.Set<java.lang.String> |
getGrantorRoles() |
java.util.Set<com.appiancorp.type.refs.GroupRef> |
getMemberGroupRefs()
Returns the Appian data source
GroupRef s for the groups where the user is a member. |
java.util.Set<java.lang.String> |
getMemberGroupUuids()
Returns the UUIDs of the groups where the user is a member.
|
java.lang.String |
getName() |
java.util.Locale |
getOverrideLocale() |
java.lang.String |
getPassword() |
PasswordStatus |
getPasswordStatus() |
java.util.Set<java.lang.String> |
getRoles()
Returns the user's roles.
|
char[] |
getScsKey()
Returns the key used to encrypt and decrypt values stored in the secure credentials store for this user.
|
java.lang.String |
getUsername() |
UserProfile |
getUserProfile() |
com.appiancorp.type.refs.UserRef |
getUserRef()
Returns the Appian data source
UserRef for the user of these Credentials. |
java.lang.String |
getUserUuid() |
void |
hashAndSetScsKey(char[] scsKeyPlainText)
Hashes and sets the key used to encrypt and decrypt values stored in the secure credentials store for this
user.
|
int |
hashCode()
Returns the hash code of the
username . |
boolean |
isAccountNonExpired()
Returns true.
|
boolean |
isAccountNonLocked()
Returns true.
|
boolean |
isAdsSuperUser() |
boolean |
isAuthenticatedByAppianInternalProvider() |
boolean |
isCredentialsNonExpired()
Returns true.
|
boolean |
isEnabled()
Returns true.
|
boolean |
isLoggedInThroughSaml() |
boolean |
isSysAdmin() |
boolean |
isUserRefNull() |
void |
setAppianLoginContext(com.appiancorp.security.auth.AppianLoginContext appianLoginContext)
This is meant to be set only by the internal Appian authentication provider.
|
void |
setAuthenticatedByAppianInternalProvider(boolean value)
This is meant to be set only by the internal Appian authentication provider.
|
void |
setAuthorities(java.util.Collection<org.springframework.security.core.GrantedAuthority> authorities)
Deprecated.
The authorities are calculated from the user's group memebrship
and it is no longer necessary to set authorities explicitly.
|
void |
setEncryptedSamlAssertion(java.lang.String encryptedAssertion)
This is meant to be set only by the SamlAuthenticationWrapper.
|
void |
setIsAdsSuperUser(boolean isAdsSuperUser) |
void |
setLoggedInThroughSaml(boolean loggedInThroughSaml)
This is meant to be set only by the internal Appian authentication provider.
|
void |
setOverrideLocale(java.util.Locale overrideLocale) |
void |
setPasswordStatus(PasswordStatus passwordStatus) |
void |
setScsKey(char[] scsKey)
Sets the key used to encrypt and decrypt values stored in the secure credentials store for this user.
|
java.lang.String |
toString() |
@Deprecated public AppianUserDetails(UserProfile userProfile, PasswordStatus passwordStatus, java.util.Set<java.lang.String> roles)
AppianUserDetailsService
.public AppianUserDetails(UserProfile userProfile, com.appiancorp.security.auth.GroupMembershipInfoProvider groupMembershipInfoProvider, PasswordStatus passwordStatus)
public AppianUserDetails(java.lang.String username, com.appiancorp.security.auth.GroupMembershipInfoProvider groupMembershipInfoProvider)
public UserProfile getUserProfile()
public java.lang.String getUserUuid()
getUserUuid
in interface com.appiancorp.security.auth.SecurityContext
public void setOverrideLocale(java.util.Locale overrideLocale)
public java.util.Locale getOverrideLocale()
getOverrideLocale
in interface com.appiancorp.security.auth.SecurityContext
public void setIsAdsSuperUser(boolean isAdsSuperUser)
public boolean isAdsSuperUser()
isAdsSuperUser
in interface com.appiancorp.security.auth.SecurityContext
public PasswordStatus getPasswordStatus()
public void setPasswordStatus(PasswordStatus passwordStatus)
public char[] getScsKey()
public void setScsKey(char[] scsKey)
scsKey
- the key that will be used to encrypt and decrypt valuespublic void hashAndSetScsKey(char[] scsKeyPlainText)
scsKeyPlainText
- the plain text of the key that will be used to encrypt and decrypt valuespublic java.lang.String getUsername()
getUsername
in interface org.springframework.security.core.userdetails.UserDetails
public java.lang.String getPassword()
getPassword
in interface org.springframework.security.core.userdetails.UserDetails
public boolean isAccountNonExpired()
isAccountNonExpired
in interface org.springframework.security.core.userdetails.UserDetails
public boolean isAccountNonLocked()
isAccountNonLocked
in interface org.springframework.security.core.userdetails.UserDetails
public boolean isCredentialsNonExpired()
isCredentialsNonExpired
in interface org.springframework.security.core.userdetails.UserDetails
public boolean isEnabled()
isEnabled
in interface org.springframework.security.core.userdetails.UserDetails
public java.util.Collection<org.springframework.security.core.GrantedAuthority> getAuthorities()
getAuthorities
in interface org.springframework.security.core.userdetails.UserDetails
@Deprecated public void setAuthorities(java.util.Collection<org.springframework.security.core.GrantedAuthority> authorities)
authorities
- public java.lang.String getName()
getName
in interface java.security.Principal
public com.appiancorp.type.refs.UserRef getUserRef()
UserRef
for the user of these Credentials.getUserRef
in interface com.appiancorp.security.auth.SecurityContext
public boolean isUserRefNull()
isUserRefNull
in interface com.appiancorp.security.auth.SecurityContext
public java.util.Set<java.lang.String> getMemberGroupUuids()
getMemberGroupUuids
in interface com.appiancorp.security.auth.SecurityContext
public java.util.Set<com.appiancorp.type.refs.GroupRef> getMemberGroupRefs()
GroupRef
s for the groups where the user is a member.getMemberGroupRefs
in interface com.appiancorp.security.auth.SecurityContext
public java.util.Set<java.lang.String> getRoles()
getRoles
in interface com.appiancorp.security.auth.SecurityContext
public boolean isSysAdmin()
isSysAdmin
in interface com.appiancorp.security.auth.SecurityContext
public java.lang.String getGrantorName()
getGrantorName
in interface com.appiancorp.security.auth.SecurityContext
public java.util.Set<java.lang.String> getGrantorRoles()
getGrantorRoles
in interface com.appiancorp.security.auth.SecurityContext
public boolean isAuthenticatedByAppianInternalProvider()
isAuthenticatedByAppianInternalProvider
in interface com.appiancorp.security.auth.SecurityContext
public void setAuthenticatedByAppianInternalProvider(boolean value)
public boolean isLoggedInThroughSaml()
isLoggedInThroughSaml
in interface com.appiancorp.security.auth.SecurityContext
public void setLoggedInThroughSaml(boolean loggedInThroughSaml)
public com.appiancorp.security.auth.AppianLoginContext getAppianLoginContext()
getAppianLoginContext
in interface com.appiancorp.security.auth.SecurityContext
public void setAppianLoginContext(com.appiancorp.security.auth.AppianLoginContext appianLoginContext)
public java.lang.String getEncryptedSamlAssertion()
public void setEncryptedSamlAssertion(java.lang.String encryptedAssertion)
encryptedAssertion
- public void clearEncryptedSamlAssertion()
public java.lang.String toString()
toString
in interface java.security.Principal
toString
in class java.lang.Object
public int hashCode()
username
.hashCode
in interface java.security.Principal
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
true
if the given object is an instance of AppianUserDetails
and
has the same username
as this object.equals
in interface java.security.Principal
equals
in class java.lang.Object
Copyright © 2003-2024 Appian Corporation. All Rights Reserved.