IdentityService, which creates and uses DefaultUserIdentitys.
The associate(UserIdentity, RunAsToken) method ignores the
user, but will associate the RunAsToken with the current thread
until Association#close() is called.
| Modifier and Type | Field and Description |
|---|---|
| private static final IdentityService. | |
| private static final IdentityService. | |
| private static final ThreadLocal |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public IdentityService. | associate(UserIdentity
The UserIdentity user, IdentityService.The runAsToken to associate, obtained from runAsTokennewRunAsToken(String), or null.Implements org. |
| public UserIdentity | |
| public static boolean | |
| public IdentityService. | newRunAsToken(String
a role name roleName)Implements org. |
| public UserIdentity | newUserIdentity(final Subject
Subject to include in UserIdentity subject, final Principal Principal to include in UserIdentity. This will be returned from getUserPrincipal calls userPrincipal, final String[] set of roles to include in UserIdentity. roles)Implements org. |
| public void | onLogout(UserIdentity
The user that has logged out user)Implements org. |
| CLEAR_RUN_AS | back to summary |
|---|---|
| private static final IdentityService. | |
| NOOP | back to summary |
|---|---|
| private static final IdentityService. | |
| runAsRole | back to summary |
|---|---|
| private static final ThreadLocal<String> runAsRole | |
| DefaultIdentityService | back to summary |
|---|---|
| public DefaultIdentityService() | |
| associate | back to summary |
|---|---|
| public IdentityService. Implements org. Doc from org. Associate a runas Token with the current user and thread.
| |
| getSystemUserIdentity | back to summary |
|---|---|
| public UserIdentity getSystemUserIdentity() Implements org.
| |
| isRoleAssociated | back to summary |
|---|---|
| public static boolean isRoleAssociated(String role) | |
| newRunAsToken | back to summary |
|---|---|
| public IdentityService. Implements org. Doc from org. Create a new RunAsToken from a runAsName (normally a role).
| |
| newUserIdentity | back to summary |
|---|---|
| public UserIdentity newUserIdentity(final Subject subject, final Principal userPrincipal, final String[] roles) Implements org. Doc from org. Create a new UserIdentity for use with this identity service. The UserIdentity should be immutable and able to be cached.
| |
| onLogout | back to summary |
|---|---|
| public void onLogout(UserIdentity user) Implements org. Doc from org. Called to notify that a user has been logged out.
The service may, among other actions, close any
| |