Associates UserIdentities from with threads and UserIdentity.Contexts.
Disassociate the user identity from the current thread
and restore previous identity.
Associate a runas Token with the current user and thread.
user The UserIdentity
token The runAsToken to associate.
- The previous runAsToken or null.
Disassociate the current runAsToken from the thread
and reassociate the previous token.
token RUNAS returned from previous associateRunAs call
Create a new UserIdentity for use with this identity service.
The UserIdentity should be immutable and able to be cached.
subject Subject to include in UserIdentity
userPrincipal Principal to include in UserIdentity. This will be returned from getUserPrincipal calls
roles set of roles to include in UserIdentity.
- A new immutable UserIdententity
Create a new RunAsToken from a runAsName (normally a role).
runAsName Normally a role name
- A new immutable RunAsToken