public class CustomUser
extends org.springframework.security.core.userdetails.User
User
that includes custom attributes for site personalization
Note: This class should be used by all authentication providers to integrate with features like targeting
Modifier and Type | Field and Description |
---|---|
protected Map<String,Object> |
attributes |
Constructor and Description |
---|
CustomUser(String username,
String password,
boolean enabled,
boolean accountNonExpired,
boolean credentialsNonExpired,
boolean accountNonLocked,
Collection<? extends org.springframework.security.core.GrantedAuthority> authorities) |
CustomUser(String username,
String password,
Collection<? extends org.springframework.security.core.GrantedAuthority> authorities) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
<T> T |
getAttribute(String name) |
Map<String,Object> |
getAttributes() |
int |
hashCode() |
void |
setAttribute(String name,
Object value) |
void |
setAttributes(Map<String,Object> attributes) |
String |
toString() |
public CustomUser(String username, String password, Collection<? extends org.springframework.security.core.GrantedAuthority> authorities)
public CustomUser(String username, String password, boolean enabled, boolean accountNonExpired, boolean credentialsNonExpired, boolean accountNonLocked, Collection<? extends org.springframework.security.core.GrantedAuthority> authorities)
public <T> T getAttribute(String name)
public boolean equals(Object o)
equals
in class org.springframework.security.core.userdetails.User
public int hashCode()
hashCode
in class org.springframework.security.core.userdetails.User
public String toString()
toString
in class org.springframework.security.core.userdetails.User
Copyright © 2020 CrafterCMS. All rights reserved.