org.springframework.security.access.hierarchicalroles
Class UserDetailsWrapper

java.lang.Object
  extended by org.springframework.security.access.hierarchicalroles.UserDetailsWrapper
All Implemented Interfaces:
Serializable, UserDetails

Deprecated. use a RoleHierarchyVoter instead.

public class UserDetailsWrapper
extends Object
implements UserDetails

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.

Author:
Michael Mayr
See Also:
Serialized Form

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

UserDetailsWrapper

public UserDetailsWrapper(UserDetails userDetails,
                          RoleHierarchy roleHierarchy)
Deprecated. 
Method Detail

isAccountNonExpired

public boolean isAccountNonExpired()
Deprecated. 
Description copied from interface: UserDetails
Indicates whether the user's account has expired. An expired account cannot be authenticated.

Specified by:
isAccountNonExpired in interface UserDetails
Returns:
true if the user's account is valid (ie non-expired), false if no longer valid (ie expired)

isAccountNonLocked

public boolean isAccountNonLocked()
Deprecated. 
Description copied from interface: UserDetails
Indicates whether the user is locked or unlocked. A locked user cannot be authenticated.

Specified by:
isAccountNonLocked in interface UserDetails
Returns:
true if the user is not locked, false otherwise

getAuthorities

public Collection<GrantedAuthority> getAuthorities()
Deprecated. 
Description copied from interface: UserDetails
Returns the authorities granted to the user. Cannot return null.

Specified by:
getAuthorities in interface UserDetails
Returns:
the authorities, sorted by natural key (never null)

isCredentialsNonExpired

public boolean isCredentialsNonExpired()
Deprecated. 
Description copied from interface: UserDetails
Indicates whether the user's credentials (password) has expired. Expired credentials prevent authentication.

Specified by:
isCredentialsNonExpired in interface UserDetails
Returns:
true if the user's credentials are valid (ie non-expired), false if no longer valid (ie expired)

isEnabled

public boolean isEnabled()
Deprecated. 
Description copied from interface: UserDetails
Indicates whether the user is enabled or disabled. A disabled user cannot be authenticated.

Specified by:
isEnabled in interface UserDetails
Returns:
true if the user is enabled, false otherwise

getPassword

public String getPassword()
Deprecated. 
Description copied from interface: UserDetails
Returns the password used to authenticate the user. Cannot return null.

Specified by:
getPassword in interface UserDetails
Returns:
the password (never null)

getUsername

public String getUsername()
Deprecated. 
Description copied from interface: UserDetails
Returns the username used to authenticate the user. Cannot return null.

Specified by:
getUsername in interface UserDetails
Returns:
the username (never null)

getUnwrappedUserDetails

public UserDetails getUnwrappedUserDetails()
Deprecated. 


Copyright © 2004-2009 SpringSource, Inc. All Rights Reserved.