|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.security.access.hierarchicalroles.UserDetailsWrapper
RoleHierarchyVoter
instead.
public class UserDetailsWrapper
This class wraps Spring Security's UserDetails in a way that its getAuthorities() method is delegated to RoleHierarchy.getReachableGrantedAuthorities. All other methods are delegated to the UserDetails implementation.
Constructor Summary | |
---|---|
UserDetailsWrapper(UserDetails userDetails,
RoleHierarchy roleHierarchy)
Deprecated. |
Method Summary | |
---|---|
Collection<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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public UserDetailsWrapper(UserDetails userDetails, RoleHierarchy roleHierarchy)
Method Detail |
---|
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<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
null
.
getPassword
in interface UserDetails
null
)public String getUsername()
UserDetails
null
.
getUsername
in interface UserDetails
null
)public UserDetails getUnwrappedUserDetails()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |