| 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: 543691 $ $Date: 2007-06-02 03:37:08 +0200 (sam., 02 juin 2007) $ |
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. | protected Principal | userPrincipal The authenticated Principal to be exposed to applications. |
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<String> 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(Realm realm, String name, String password, List<String> roles, Principal userPrincipal) Construct a new Principal, associated with the specified Realm, for the
specified username and password, with the specified role names
(as Strings). |
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.
|
userPrincipal | protected Principal userPrincipal(Code) | | The authenticated Principal to be exposed to applications.
|
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<String> 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 |
GenericPrincipal | public GenericPrincipal(Realm realm, String name, String password, List<String> roles, Principal userPrincipal)(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 Parameters: userPrincipal - - the principal to be returned from the request getUserPrincipal call if not null; if null, this will be returned |
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.
|
|
|