org.eclipse.jetty.security
Class DefaultUserIdentity
java.lang.Object
org.eclipse.jetty.security.DefaultUserIdentity
- All Implemented Interfaces:
- UserIdentity
public class DefaultUserIdentity
- extends Object
- implements UserIdentity
The default implementation of UserIdentity.
DefaultUserIdentity
public DefaultUserIdentity(Subject subject,
Principal userPrincipal,
String[] roles)
getSubject
public Subject getSubject()
- Specified by:
getSubject
in interface UserIdentity
- Returns:
- The user subject
getUserPrincipal
public Principal getUserPrincipal()
- Specified by:
getUserPrincipal
in interface UserIdentity
- Returns:
- The user principal
isUserInRole
public boolean isUserInRole(String role,
UserIdentity.Scope scope)
- 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 interface UserIdentity
- Parameters:
role
- A role name.
- Returns:
- True if the user can act in that role.
toString
public String toString()
- Overrides:
toString
in class Object
Copyright © 1995-2011 Mort Bay Consulting. All Rights Reserved.