public final class GenericUser extends Object implements org.springframework.security.core.userdetails.UserDetails, org.springframework.security.core.CredentialsContainer
fromPrincipal(java.security.Principal)
fromUser(cn.home1.oss.lib.security.api.User)
. username => type:id:name:tel:wxModifier and Type | Field and Description |
---|---|
static String |
GENERIC_USER_COOKIE |
static String |
GENERIC_USER_TOKEN |
Constructor and Description |
---|
GenericUser() |
Modifier and Type | Method and Description |
---|---|
void |
eraseCredentials() |
static GenericUser |
fromPrincipal(Principal principal) |
static Optional<GenericUser> |
fromSecurityContext() |
static GenericUser |
fromUser(User user) |
String |
getId() |
String |
getName() |
String |
getType() |
static boolean |
isGenericUser(Object object) |
static boolean |
isGenericUserLogin(GenericUser genericUser) |
UserDetails |
toUserInfo() |
static GenericUser |
unknownUser() |
public static final String GENERIC_USER_COOKIE
public static final String GENERIC_USER_TOKEN
public static GenericUser fromPrincipal(Principal principal)
public static Optional<GenericUser> fromSecurityContext()
public static GenericUser fromUser(User user)
public static boolean isGenericUser(Object object)
public static boolean isGenericUserLogin(GenericUser genericUser)
public static GenericUser unknownUser()
public void eraseCredentials()
eraseCredentials
in interface org.springframework.security.core.CredentialsContainer
public String getType()
public String getId()
public String getName()
public UserDetails toUserInfo()
Copyright © 2017. All rights reserved.