Package ch.tocco.nice2.security.spi
Class AnonymousPrincipal
java.lang.Object
ch.tocco.nice2.security.spi.AnonymousPrincipal
- All Implemented Interfaces:
Principal
-
Field 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
toString()
-
Field Details
-
INSTANCE
-
-
Method Details
-
isAnonymous
public boolean isAnonymous()- Specified by:
isAnonymous
in interfacePrincipal
-
requiresTwoFactorAuth
public boolean requiresTwoFactorAuth()- Specified by:
requiresTwoFactorAuth
in interfacePrincipal
-
isSupportUser
public boolean isSupportUser()- Specified by:
isSupportUser
in interfacePrincipal
-
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
-
getAttributeKeys
- Specified by:
getAttributeKeys
in interfacePrincipal
-
getPrimaryKey
- Specified by:
getPrimaryKey
in interfacePrincipal
-