User object that encapsulates user identity and operations such as run-as-role actions,
checking isUserInRole and getUserPrincipal.
Implementations of UserIdentity should be immutable so that they may be
cached by Authenticators and LoginServices.
- The user principal
Check if the user is in a role.
This call is used to satisfy authorization calls from
container code which will be using translated role names.
role A role name.
- True if the user can act in that role.
A UserIdentity Scope.
A scope is the environment in which a User Identity is to
be interpreted. Typically it is set by the target servlet of
- The context path that the identity is being considered within
- The name of the identity context. Typically this is the servlet name.
- A map of role reference names that converts from names used by application code
to names used by the context deployment.