Class ModifiablePrincipal
java.lang.Object
ch.tocco.nice2.security.spi.ModifiablePrincipal
- All Implemented Interfaces:
Principal
- Direct Known Subclasses:
AnonymousRolePrincipal
-
Field Summary
Fields inherited from interface Principal
ADMIN_ROLE_TYPES -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleangetAttribute(String key) UsePrincipalAttributesfor key namegetName()getRoles()booleanbooleanbooleanbooleanremoveRole(Role role) booleanvoidsetAttribute(String key, Object value) UsePrincipalAttributesfor key namevoidvoidvoidsetRequiresTwoFactorAuth(boolean requiresTwoFactorAuth) voidsetSupportUser(boolean supportUser) toString()Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface Principal
hasAdminRole
-
Constructor Details
-
ModifiablePrincipal
public ModifiablePrincipal() -
ModifiablePrincipal
-
-
Method Details
-
isAnonymous
public boolean isAnonymous()- Specified by:
isAnonymousin interfacePrincipal
-
requiresTwoFactorAuth
public boolean requiresTwoFactorAuth()- Specified by:
requiresTwoFactorAuthin interfacePrincipal
-
setRequiresTwoFactorAuth
public void setRequiresTwoFactorAuth(boolean requiresTwoFactorAuth) -
isSupportUser
public boolean isSupportUser()- Specified by:
isSupportUserin interfacePrincipal
-
setSupportUser
public void setSupportUser(boolean supportUser) -
toString
-
getName
-
setName
- Specified by:
setNamein interfacePrincipal- Throws:
UnauthorizedException
-
getRoles
-
addRole
- Specified by:
addRolein interfacePrincipal- Throws:
UnauthorizedException
-
removeRole
- Specified by:
removeRolein interfacePrincipal- Throws:
UnauthorizedException
-
hasRole
-
setAttribute
Description copied from interface:PrincipalUsePrincipalAttributesfor key name- Specified by:
setAttributein interfacePrincipal
-
getAttribute
Description copied from interface:PrincipalUsePrincipalAttributesfor key name- Specified by:
getAttributein interfacePrincipal
-
getAttributes
-
getAttributeKeys
- Specified by:
getAttributeKeysin interfacePrincipal
-
setPk
-
getPrimaryKey
- Specified by:
getPrimaryKeyin interfacePrincipal
-