public interface SimpleIdentityManager
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
GUEST_IDENTITY_ID |
Modifier and Type | Method and Description |
---|---|
void |
addRule(Rule rule) |
java.util.Collection |
getActions()
Return a list of the actions that are registered.
|
SimpleIdentity |
getAdministrator() |
SimpleIdentity |
getCurrentIdentity()
Return the identity of the current session in the system.
|
java.util.Collection<Rule> |
getRules() |
void |
login(java.lang.String domain,
java.lang.String identityid,
java.lang.String password)
Authenticate the identity in the system and stablish a session with this
identity.
|
void |
logout()
Closes the session stablised with the current identity.
|
boolean |
needDomain()
Inform if the login process require a domain name.
|
void |
registerAction(java.lang.String actionName)
Register the actionName as an action that require authorization.
|
void |
sudo(java.lang.String domain,
java.lang.String identityid,
java.lang.Runnable acction)
Run the specified action as the specified identity.
|
static final java.lang.String GUEST_IDENTITY_ID
void login(java.lang.String domain, java.lang.String identityid, java.lang.String password) throws UnauthorizedException
domain,
- the domain used to authenticate the useridentityid,
- identity id to login in the systempassword
- UnauthorizedException
void logout()
SimpleIdentity getCurrentIdentity()
SimpleIdentity getAdministrator()
boolean needDomain()
void sudo(java.lang.String domain, java.lang.String identityid, java.lang.Runnable acction)
domain
- identityid
- acction
- void registerAction(java.lang.String actionName)
actionName
- java.util.Collection getActions()
void addRule(Rule rule)
java.util.Collection<Rule> getRules()