Package ch.tocco.nice2.security.spi
Class ModifiablePrincipal
java.lang.Object
ch.tocco.nice2.security.spi.ModifiablePrincipal
- All Implemented Interfaces:
Principal
- Direct Known Subclasses:
AnonymousRolePrincipal
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
getAttribute
(String key) getName()
getRoles()
boolean
boolean
boolean
boolean
removeRole
(Role role) boolean
void
setAttribute
(String key, Object value) void
void
void
setRequiresTwoFactorAuth
(boolean requiresTwoFactorAuth) void
setSupportUser
(boolean supportUser) toString()
-
Constructor Details
-
ModifiablePrincipal
public ModifiablePrincipal() -
ModifiablePrincipal
-
-
Method Details
-
isAnonymous
public boolean isAnonymous()- Specified by:
isAnonymous
in interfacePrincipal
-
requiresTwoFactorAuth
public boolean requiresTwoFactorAuth()- Specified by:
requiresTwoFactorAuth
in interfacePrincipal
-
setRequiresTwoFactorAuth
public void setRequiresTwoFactorAuth(boolean requiresTwoFactorAuth) -
isSupportUser
public boolean isSupportUser()- Specified by:
isSupportUser
in interfacePrincipal
-
setSupportUser
public void setSupportUser(boolean supportUser) -
toString
-
getName
-
setName
- Specified by:
setName
in interfacePrincipal
- Throws:
UnauthorizedException
-
getRoles
-
addRole
- Specified by:
addRole
in interfacePrincipal
- Throws:
UnauthorizedException
-
removeRole
- Specified by:
removeRole
in interfacePrincipal
- Throws:
UnauthorizedException
-
hasRole
-
setAttribute
- Specified by:
setAttribute
in interfacePrincipal
-
getAttribute
- Specified by:
getAttribute
in interfacePrincipal
-
getAttributes
-
getAttributeKeys
- Specified by:
getAttributeKeys
in interfacePrincipal
-
setPk
-
getPrimaryKey
- Specified by:
getPrimaryKey
in interfacePrincipal
-