org.springframework.security.core.userdetails.memory
Class UserAttribute
java.lang.Object
org.springframework.security.core.userdetails.memory.UserAttribute
public class UserAttribute
- extends Object
Used by InMemoryDaoImpl
to temporarily store the attributes associated with a user.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
UserAttribute
public UserAttribute()
addAuthority
public void addAuthority(GrantedAuthority newAuthority)
getAuthorities
public List<GrantedAuthority> getAuthorities()
setAuthorities
public void setAuthorities(List<GrantedAuthority> authorities)
- Set all authorities for this user.
- Parameters:
authorities
- List
<GrantedAuthority
>- Since:
- 1.1
setAuthoritiesAsString
public void setAuthoritiesAsString(List<String> authoritiesAsStrings)
- Set all authorities for this user from String values.
It will create the necessary
GrantedAuthority
objects.
- Parameters:
authoritiesAsStrings
- List
<String
>- Since:
- 1.1
getPassword
public String getPassword()
isEnabled
public boolean isEnabled()
isValid
public boolean isValid()
setEnabled
public void setEnabled(boolean enabled)
setPassword
public void setPassword(String password)