Top Description Fields Constructors Methods
org.eclipse.jetty.security.internal

public Class DefaultUserIdentity

extends Object
implements UserIdentity
Class Inheritance
All Implemented Interfaces
org.eclipse.jetty.security.UserIdentity
Imports
java.security.Principal, javax.security.auth.Subject, org.eclipse.jetty.security.DefaultIdentityService, .UserIdentity

The default implementation of UserIdentity.

Field Summary

Modifier and TypeField and Description
private final String[]
private final Subject
private final Principal

Constructor Summary

AccessConstructor and Description
public
DefaultUserIdentity(Subject subject, Principal userPrincipal, String[] roles)

Method Summary

Modifier and TypeMethod and Description
public Subject
public Principal
public boolean
isUserInRole(String
A role name.
role
)

Implements org.eclipse.jetty.security.UserIdentity.isUserInRole.

Check if the user is in a role.
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

_rolesback to summary
private final String[] _roles
_subjectback to summary
private final Subject _subject
_userPrincipalback to summary
private final Principal _userPrincipal

Constructor Detail

DefaultUserIdentityback to summary
public DefaultUserIdentity(Subject subject, Principal userPrincipal, String[] roles)

Method Detail

getSubjectback to summary
public Subject getSubject()

Implements org.eclipse.jetty.security.UserIdentity.getSubject.

Returns:Subject

Doc from org.eclipse.jetty.security.UserIdentity.getSubject.

The user subject

Annotations
@Override
getUserPrincipalback to summary
public Principal getUserPrincipal()

Implements org.eclipse.jetty.security.UserIdentity.getUserPrincipal.

Returns:Principal

Doc from org.eclipse.jetty.security.UserIdentity.getUserPrincipal.

The user principal

Annotations
@Override
isUserInRoleback to summary
public boolean isUserInRole(String role)

Implements org.eclipse.jetty.security.UserIdentity.isUserInRole.

Doc from org.eclipse.jetty.security.UserIdentity.isUserInRole.

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.

Parameters
role:String

A role name.

Returns:boolean

True if the user can act in that role.

Annotations
@Override
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.

Annotations
@Override