Class LoggedUser
- java.lang.Object
-
- org.springframework.security.core.userdetails.User
-
- com.netgrif.application.engine.auth.domain.LoggedUser
-
- All Implemented Interfaces:
java.io.Serializable,org.springframework.security.core.CredentialsContainer,org.springframework.security.core.userdetails.UserDetails
- Direct Known Subclasses:
LdapLoggedUser
public class LoggedUser extends org.springframework.security.core.userdetails.User- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected booleananonymousprotected java.lang.StringfullNameprotected java.util.Set<java.lang.String>groupsprotected java.lang.Stringidprotected java.util.Set<java.lang.String>processRolesstatic longserialVersionUID
-
Constructor Summary
Constructors Constructor Description LoggedUser(java.lang.String id, java.lang.String username, java.lang.String password, java.util.Collection<? extends org.springframework.security.core.GrantedAuthority> authorities)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclearImpersonated()java.lang.StringgetEmail()LoggedUsergetSelfOrImpersonated()voidimpersonate(LoggedUser toImpersonate)booleanisAdmin()booleanisImpersonating()voidparseProcessRoles(java.util.Set<ProcessRole> processRoles)java.lang.StringtoString()AnonymousUsertransformToAnonymousUser()AuthortransformToAuthor()IUsertransformToUser()-
Methods inherited from class org.springframework.security.core.userdetails.User
builder, equals, eraseCredentials, getAuthorities, getPassword, getUsername, hashCode, isAccountNonExpired, isAccountNonLocked, isCredentialsNonExpired, isEnabled, withDefaultPasswordEncoder, withUserDetails, withUsername
-
-
-
-
Field Detail
-
serialVersionUID
public static final long serialVersionUID
- See Also:
- Constant Field Values
-
id
protected java.lang.String id
-
fullName
protected java.lang.String fullName
-
groups
protected java.util.Set<java.lang.String> groups
-
processRoles
protected java.util.Set<java.lang.String> processRoles
-
anonymous
protected boolean anonymous
-
-
Method Detail
-
parseProcessRoles
public void parseProcessRoles(java.util.Set<ProcessRole> processRoles)
-
isAdmin
public boolean isAdmin()
-
getEmail
public java.lang.String getEmail()
-
transformToUser
public IUser transformToUser()
-
transformToAnonymousUser
public AnonymousUser transformToAnonymousUser()
-
impersonate
public void impersonate(LoggedUser toImpersonate)
-
clearImpersonated
public void clearImpersonated()
-
isImpersonating
public boolean isImpersonating()
-
getSelfOrImpersonated
public LoggedUser getSelfOrImpersonated()
-
toString
public java.lang.String toString()
- Overrides:
toStringin classorg.springframework.security.core.userdetails.User
-
transformToAuthor
public Author transformToAuthor()
-
-