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
ConstructorsConstructorDescriptionPlatformUserDetails(OpenMetadataUserAccount openMetadataUserAccount) Copy constructor -
Method Summary
Modifier and TypeMethodDescriptionbooleanCollection<? 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.inthashCode()booleanReturn if the account is not disabled.booleanReturn if the account is not locked.booleanReturn whether the account credentials (secrets) are still valid.booleanReturn 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:
isAccountNonExpiredin interfaceorg.springframework.security.core.userdetails.UserDetails- Returns:
- boolean
-
isAccountNonLocked
public boolean isAccountNonLocked()Return if the account is not locked.- Specified by:
isAccountNonLockedin interfaceorg.springframework.security.core.userdetails.UserDetails- Returns:
- boolean
-
isCredentialsNonExpired
public boolean isCredentialsNonExpired()Return whether the account credentials (secrets) are still valid.- Specified by:
isCredentialsNonExpiredin interfaceorg.springframework.security.core.userdetails.UserDetails- Returns:
- boolean
-
isEnabled
public boolean isEnabled()Return whether the account is enabled.- Specified by:
isEnabledin 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:
getAuthoritiesin 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:
getPasswordin interfaceorg.springframework.security.core.userdetails.UserDetails- Returns:
- encrypted password
-
getUsername
Return the userId of the user's account. Notice capitalization of Username.- Specified by:
getUsernamein 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()
-