|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IdentityService<SCOPED extends UserIdentity,RUNAS>
Associates UserIdentities from with threads and UserIdentity.Contexts.
| Nested Class Summary | |
|---|---|
static interface |
IdentityService.Scoped
A scoped UserIdentity. |
| Method Summary | |
|---|---|
SCOPED |
associate(UserIdentity user,
UserIdentity.Scope context)
Associate the UserIdentity and UserIdentity.Scope
with the current thread. |
RUNAS |
associateRunAs(RunAsToken token)
Associate a runas Token with the current thread. |
void |
disassociate(SCOPED scoped)
Disassociate the current UserIdentity and reinstate the previousUser identity. |
void |
disassociateRunAs(RUNAS token)
Disassociate the current runAsToken from the thread and reassociate the previous token. |
RunAsToken |
newRunAsToken(String runAsName)
Create a new RunAsToken from a runAsName (normally a role). |
UserIdentity |
newSystemUserIdentity()
|
UserIdentity |
newUserIdentity(Subject subject,
Principal userPrincipal,
String[] roles)
Create a new UserIdentity for use with this identity service. |
| Method Detail |
|---|
SCOPED associate(UserIdentity user,
UserIdentity.Scope context)
UserIdentity and UserIdentity.Scope
with the current thread.
user - The current user.context - The new scope.
UserIdentity.void disassociate(SCOPED scoped)
scoped - SCOPED returned from previous associate callRUNAS associateRunAs(RunAsToken token)
token - The runAsToken to associate.
void disassociateRunAs(RUNAS token)
token - RUNAS returned from previous associateRunAs call
UserIdentity newUserIdentity(Subject subject,
Principal userPrincipal,
String[] roles)
subject - Subject to include in UserIdentityuserPrincipal - Principal to include in UserIdentity. This will be returned from getUserPrincipal callsroles - set of roles to include in UserIdentity.
RunAsToken newRunAsToken(String runAsName)
runAsName - Normally a role name
UserIdentity newSystemUserIdentity()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||