DefaultIdentityServicepublic interface IdentityService
| Modifier and Type | Field | Description |
|---|---|---|
static java.lang.String[] |
NO_ROLES |
| Modifier and Type | Method | Description |
|---|---|---|
java.lang.Object |
associate(UserIdentity user) |
Associate a user identity with the current thread.
|
void |
disassociate(java.lang.Object previous) |
Disassociate the user identity from the current thread
and restore previous identity.
|
UserIdentity |
getSystemUserIdentity() |
|
RunAsToken |
newRunAsToken(java.lang.String runAsName) |
Create a new RunAsToken from a runAsName (normally a role).
|
UserIdentity |
newUserIdentity(javax.security.auth.Subject subject,
java.security.Principal userPrincipal,
java.lang.String[] roles) |
Create a new UserIdentity for use with this identity service.
|
java.lang.Object |
setRunAs(UserIdentity user,
RunAsToken token) |
Associate a runas Token with the current user and thread.
|
void |
unsetRunAs(java.lang.Object token) |
Disassociate the current runAsToken from the thread
and reassociate the previous token.
|
java.lang.Object associate(UserIdentity user)
SecurityHandler.handle(String, org.eclipse.jetty.server.Request, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
method and then again with a null argument as that call exits.user - The current user or null for no user to associated.void disassociate(java.lang.Object previous)
previous - The opaque object returned from a call to associate(UserIdentity)java.lang.Object setRunAs(UserIdentity user, RunAsToken token)
user - The UserIdentitytoken - The runAsToken to associate.void unsetRunAs(java.lang.Object token)
token - RUNAS returned from previous associateRunAs callUserIdentity newUserIdentity(javax.security.auth.Subject subject, java.security.Principal userPrincipal, java.lang.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(java.lang.String runAsName)
runAsName - Normally a role nameUserIdentity getSystemUserIdentity()
Copyright © 1995–2018 Webtide. All rights reserved.