Class ModifiablePrincipal
java.lang.Object
ch.tocco.nice2.security.spi.ModifiablePrincipal
- All Implemented Interfaces:
Principal
- Direct Known Subclasses:
AnonymousRolePrincipal
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleangetAttribute(String key) getName()getRoles()booleanbooleanbooleanbooleanremoveRole(Role role) booleanvoidsetAttribute(String key, Object value) voidvoidvoidsetRequiresTwoFactorAuth(boolean requiresTwoFactorAuth) voidsetSupportUser(boolean supportUser) toString()
-
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
- Specified by:
setAttributein interfacePrincipal
-
getAttribute
- Specified by:
getAttributein interfacePrincipal
-
getAttributes
-
getAttributeKeys
- Specified by:
getAttributeKeysin interfacePrincipal
-
setPk
-
getPrimaryKey
- Specified by:
getPrimaryKeyin interfacePrincipal
-