| java.lang.Object org.apache.catalina.realm.GenericPrincipal
GenericPrincipal | public class GenericPrincipal implements Principal(Code) | | Generic implementation of java.security.Principal that
is available for use by Realm implementations.
author: Craig R. McClanahan version: $Revision: 1.4 $ $Date: 2004/02/27 14:58:45 $ |
Field Summary | |
protected String | name The username of the user represented by this Principal. | protected String | password The authentication credentials for the user represented by
this Principal. | protected Realm | realm The Realm with which this Principal is associated. | protected String | roles The set of roles associated with this user. |
Constructor Summary | |
public | GenericPrincipal(Realm realm, String name, String password) Construct a new Principal, associated with the specified Realm, for the
specified username and password. | public | GenericPrincipal(Realm realm, String name, String password, List roles) Construct a new Principal, associated with the specified Realm, for the
specified username and password, with the specified role names
(as Strings). | public | GenericPrincipal(String name, String password, List roles) |
name | protected String name(Code) | | The username of the user represented by this Principal.
|
password | protected String password(Code) | | The authentication credentials for the user represented by
this Principal.
|
realm | protected Realm realm(Code) | | The Realm with which this Principal is associated.
|
roles | protected String roles(Code) | | The set of roles associated with this user.
|
GenericPrincipal | public GenericPrincipal(Realm realm, String name, String password)(Code) | | Construct a new Principal, associated with the specified Realm, for the
specified username and password.
Parameters: realm - The Realm that owns this Principal Parameters: name - The username of the user represented by this Principal Parameters: password - Credentials used to authenticate this user |
GenericPrincipal | public GenericPrincipal(Realm realm, String name, String password, List roles)(Code) | | Construct a new Principal, associated with the specified Realm, for the
specified username and password, with the specified role names
(as Strings).
Parameters: realm - The Realm that owns this principal Parameters: name - The username of the user represented by this Principal Parameters: password - Credentials used to authenticate this user Parameters: roles - List of roles (must be Strings) possessed by this user |
hasRole | public boolean hasRole(String role)(Code) | | Does the user represented by this Principal possess the specified role?
Parameters: role - Role to be tested |
toString | public String toString()(Code) | | Return a String representation of this object, which exposes only
information that should be public.
|
|
|