Class PlatformUserDetails
java.lang.Object
org.odpi.openmetadata.userauthn.auth.PlatformUserDetails
- All Implemented Interfaces:
Serializable
,org.springframework.security.core.userdetails.UserDetails
public class PlatformUserDetails
extends Object
implements org.springframework.security.core.userdetails.UserDetails
PlatformUserDetails is a wrapper for OpenMetadataSecurityUserDetails which is supported by the
open metadata security module. The wrapper is used to avoid including Spring classes in the Open Metadata
security module
- See Also:
-
Constructor Summary
ConstructorDescriptionPlatformUserDetails
(OpenMetadataUserAccount openMetadataUserAccount) Copy constructor -
Method Summary
Modifier and TypeMethodDescriptionboolean
Collection<? extends org.springframework.security.core.GrantedAuthority>
Extracts the user identifier, security roles and security groups from the user account and sets them up as authorities for the token.Return the name of the user.Return the distinguished name of the user.Return an encrypted password.Return the userId of the user's account.int
hashCode()
boolean
Return if the account is not disabled.boolean
Return if the account is not locked.boolean
Return whether the account credentials (secrets) are still valid.boolean
Return whether the account is enabled.toString()
-
Constructor Details
-
PlatformUserDetails
Copy constructor
-
-
Method Details
-
isAccountNonExpired
public boolean isAccountNonExpired()Return if the account is not disabled.- Specified by:
isAccountNonExpired
in interfaceorg.springframework.security.core.userdetails.UserDetails
- Returns:
- boolean
-
isAccountNonLocked
public boolean isAccountNonLocked()Return if the account is not locked.- Specified by:
isAccountNonLocked
in interfaceorg.springframework.security.core.userdetails.UserDetails
- Returns:
- boolean
-
isCredentialsNonExpired
public boolean isCredentialsNonExpired()Return whether the account credentials (secrets) are still valid.- Specified by:
isCredentialsNonExpired
in interfaceorg.springframework.security.core.userdetails.UserDetails
- Returns:
- boolean
-
isEnabled
public boolean isEnabled()Return whether the account is enabled.- Specified by:
isEnabled
in interfaceorg.springframework.security.core.userdetails.UserDetails
- Returns:
- boolean
-
getAuthorities
Extracts the user identifier, security roles and security groups from the user account and sets them up as authorities for the token. This is called once the password has been validated.- Specified by:
getAuthorities
in interfaceorg.springframework.security.core.userdetails.UserDetails
- Returns:
- collection of granted authorities
-
getPassword
Return an encrypted password. It may be possible to retrieve the encrypted password from the user account. If that is not available, it retrieves the clear text password and encrypts it.- Specified by:
getPassword
in interfaceorg.springframework.security.core.userdetails.UserDetails
- Returns:
- encrypted password
-
getUsername
Return the userId of the user's account. Notice capitalization of Username.- Specified by:
getUsername
in interfaceorg.springframework.security.core.userdetails.UserDetails
- Returns:
- string userId
-
getDisplayName
Return the name of the user.- Returns:
- string name
-
getDistinguishedName
Return the distinguished name of the user.- Returns:
- string name
-
toString
-
equals
-
hashCode
public int hashCode()
-