Package 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 `InMemoryUserDetailsManager` to temporarily store the attributes associated with a user.

## Constructor Summary

Constructors
Constructor
Description
`UserAttribute()`

## Method Summary

Modifier and Type
Method
Description
`void`
`addAuthority(GrantedAuthority newAuthority)`
`List<GrantedAuthority>`
`getAuthorities()`
`String`
`getPassword()`
`boolean`
`isEnabled()`
`boolean`
`isValid()`
`void`
`setAuthorities(List<GrantedAuthority> authorities)`
Set all authorities for this user.
`void`
`setAuthoritiesAsString(List<String> authoritiesAsStrings)`
Set all authorities for this user from String values.
`void`
`setEnabled(boolean enabled)`
`void`
`setPassword(String password)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### UserAttribute

public UserAttribute()

## Method Details

### 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)