public class UserDetails extends Object implements AuthenticationResponse
| Constructor and Description | 
|---|
UserDetails(String username,
           Collection<String> roles)  | 
| Modifier and Type | Method and Description | 
|---|---|
boolean | 
equals(Object o)  | 
Optional<String> | 
getMessage()  | 
Collection<String> | 
getRoles()
roles getter. 
 | 
String | 
getUsername()
username getter. 
 | 
int | 
hashCode()  | 
boolean | 
isAuthenticated()
Defaults to false. 
 | 
void | 
setRoles(Collection<String> roles)
roles setter. 
 | 
void | 
setUsername(String username)
username setter. 
 | 
public UserDetails(String username, Collection<String> roles)
username - e.g. adminroles - e.g. ['ROLE_ADMIN', 'ROLE_USER']public String getUsername()
public void setUsername(String username)
username - e.g. adminpublic Collection<String> getRoles()
public void setRoles(Collection<String> roles)
roles - e.g. ['ROLE_USER', 'ROLE_ADMIN']public boolean isAuthenticated()
AuthenticationResponseisAuthenticated in interface AuthenticationResponsepublic Optional<String> getMessage()
getMessage in interface AuthenticationResponse