Class DefaultUserIdentity
java.lang.Object
org.eclipse.jetty.security.internal.DefaultUserIdentity
- All Implemented Interfaces:
UserIdentity
The default implementation of UserIdentity.
-
Constructor Summary
ConstructorDescriptionDefaultUserIdentity
(Subject subject, Principal userPrincipal, String[] roles) -
Method Summary
Modifier and TypeMethodDescriptionboolean
isUserInRole
(String role) Check if the user is in a role.toString()
-
Constructor Details
-
DefaultUserIdentity
-
-
Method Details
-
getSubject
- Specified by:
getSubject
in interfaceUserIdentity
- Returns:
- The user subject
-
getUserPrincipal
- Specified by:
getUserPrincipal
in interfaceUserIdentity
- Returns:
- The user principal
-
isUserInRole
Description copied from interface:UserIdentity
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.- Specified by:
isUserInRole
in interfaceUserIdentity
- Parameters:
role
- A role name.- Returns:
- True if the user can act in that role.
-
toString
-