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

public Class UserPrincipal

extends Object
implements Principal, Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable, java.security.Principal
Known Direct Subclasses
org.eclipse.jetty.security.JDBCLoginService.JDBCUserPrincipal
Imports
java.io.Serializable, java.security.Principal, javax.security.auth.Subject, org.eclipse.jetty.util.security.Credential

UserPrincipal Represents a user with a credential. Instances of this class can be added to a Subject to present the user, while the credentials can be added directly to the Subject.

Field Summary

Modifier and TypeField and Description
protected final Credential
private final String
private static final long

Constructor Summary

AccessConstructor and Description
public
UserPrincipal(String name, Credential credential)

Method Summary

Modifier and TypeMethod and Description
public boolean
authenticate(Object credentials)

public boolean
public boolean
public void
public void
public String
getName()

Implements java.security.Principal.getName.

Returns the name of this Principal.
public String
toString()

Overrides java.lang.Object.toString.

Implements java.security.Principal.toString.

Returns a string representation of this Principal.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

_credentialback to summary
protected final Credential _credential
_nameback to summary
private final String _name
serialVersionUIDback to summary
private static final long serialVersionUID

Constructor Detail

UserPrincipalback to summary
public UserPrincipal(String name, Credential credential)

Method Detail

authenticateback to summary
public boolean authenticate(Object credentials)
authenticateback to summary
public boolean authenticate(Credential c)
authenticateback to summary
public boolean authenticate(UserPrincipal u)
configureSubjectback to summary
public void configureSubject(Subject subject)
deconfigureSubjectback to summary
public void deconfigureSubject(Subject subject)
getNameback to summary
public String getName()

Implements java.security.Principal.getName.

Doc from java.security.Principal.getName.

Returns the name of this Principal.

Returns:String

the name of this Principal.

Annotations
@Override
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Implements java.security.Principal.toString.

Doc from java.security.Principal.toString.

Returns a string representation of this Principal.

Returns:String

a string representation of this Principal.

Annotations
@Override