RoleHierarchyVoter
or RoleHierarchyAuthoritiesMapper
instead.public class UserDetailsWrapper extends Object implements UserDetails
Constructor and Description |
---|
UserDetailsWrapper(UserDetails userDetails,
RoleHierarchy roleHierarchy)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
Collection<? extends GrantedAuthority> |
getAuthorities()
Deprecated.
Returns the authorities granted to the user.
|
String |
getPassword()
Deprecated.
Returns the password used to authenticate the user.
|
UserDetails |
getUnwrappedUserDetails()
Deprecated.
|
String |
getUsername()
Deprecated.
Returns the username used to authenticate the user.
|
boolean |
isAccountNonExpired()
Deprecated.
Indicates whether the user's account has expired.
|
boolean |
isAccountNonLocked()
Deprecated.
Indicates whether the user is locked or unlocked.
|
boolean |
isCredentialsNonExpired()
Deprecated.
Indicates whether the user's credentials (password) has expired.
|
boolean |
isEnabled()
Deprecated.
Indicates whether the user is enabled or disabled.
|
public UserDetailsWrapper(UserDetails userDetails, RoleHierarchy roleHierarchy)
public boolean isAccountNonExpired()
UserDetails
isAccountNonExpired
in interface UserDetails
true
if the user's account is valid (ie non-expired), false
if no longer valid
(ie expired)public boolean isAccountNonLocked()
UserDetails
isAccountNonLocked
in interface UserDetails
true
if the user is not locked, false
otherwisepublic Collection<? extends GrantedAuthority> getAuthorities()
UserDetails
null
.getAuthorities
in interface UserDetails
null
)public boolean isCredentialsNonExpired()
UserDetails
isCredentialsNonExpired
in interface UserDetails
true
if the user's credentials are valid (ie non-expired), false
if no longer
valid (ie expired)public boolean isEnabled()
UserDetails
isEnabled
in interface UserDetails
true
if the user is enabled, false
otherwisepublic String getPassword()
UserDetails
getPassword
in interface UserDetails
public String getUsername()
UserDetails
null
.getUsername
in interface UserDetails
null
)public UserDetails getUnwrappedUserDetails()