Realm
implementations.
| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| protected final Map | attributes
The additional attributes associated with this Principal. |
| protected transient GSSCredential | gssCredential
The user's delegated credentials. |
| protected final transient LoginContext | loginContext
The JAAS LoginContext, if any, used to authenticate this Principal. |
| protected final String | name
The username of the user represented by this Principal. |
| protected final String[] | roles
The set of roles associated with this user. |
| private static final long | |
| protected final Principal | userPrincipal
The authenticated Principal to be exposed to applications. |
| Access | Constructor and Description |
|---|---|
| public | GenericPrincipal(String
The username of the user represented by this Principal name)Construct a new Principal, associated with the specified Realm, for the specified username, with no roles. |
| public | GenericPrincipal(String
The username of the user represented by this Principal name, List<String> List of roles (must be Strings) possessed by this user roles)Construct a new Principal, associated with the specified Realm, for the specified username, with the specified role names (as Strings). |
| public | GenericPrincipal(String
The username of the user represented by this Principal name, String Unused password, List<String> List of roles (must be Strings) possessed by this user roles)
Deprecated
This method will be removed in Tomcat 11 onwards
Construct a new Principal, associated with the specified Realm, for the specified username, with the specified role names (as Strings). |
| public | GenericPrincipal(String
The username of the user represented by this Principal name, List<String> List of roles (must be Strings) possessed by this user roles, Principal - the principal to be returned from the request getUserPrincipal call if not null; if null,
this will be returned userPrincipal)Construct a new Principal, associated with the specified Realm, for the specified username, with the specified role names (as Strings). |
| public | GenericPrincipal(String
The username of the user represented by this Principal name, String Unused password, List<String> List of roles (must be Strings) possessed by this user roles, Principal - the principal to be returned from the request getUserPrincipal call if not null; if null,
this will be returned userPrincipal)
Deprecated
This method will be removed in Tomcat 11 onwards
Construct a new Principal, associated with the specified Realm, for the specified username, with the specified role names (as Strings). |
| public | GenericPrincipal(String
The username of the user represented by this Principal name, List<String> List of roles (must be Strings) possessed by this user roles, Principal - the principal to be returned from the request getUserPrincipal call if not null; if null,
this will be returned userPrincipal, LoginContext - If provided, this will be used to log out the user at the appropriate time loginContext)Construct a new Principal, associated with the specified Realm, for the specified username, with the specified role names (as Strings). |
| public | GenericPrincipal(String
The username of the user represented by this Principal name, String Unused password, List<String> List of roles (must be Strings) possessed by this user roles, Principal - the principal to be returned from the request getUserPrincipal call if not null; if null,
this will be returned userPrincipal, LoginContext - If provided, this will be used to log out the user at the appropriate time loginContext)
Deprecated
This method will be removed in Tomcat 11 onwards
Construct a new Principal, associated with the specified Realm, for the specified username, with the specified role names (as Strings). |
| public | GenericPrincipal(String
The username of the user represented by this Principal name, List<String> List of roles (must be Strings) possessed by this user roles, Principal - the principal to be returned from the request getUserPrincipal call if not null; if null,
this will be returned userPrincipal, LoginContext - If provided, this will be used to log out the user at the appropriate time loginContext, GSSCredential - If provided, the user's delegated credentials gssCredential, Map<String, Object> - If provided, additional attributes associated with this Principal attributes)Construct a new Principal, associated with the specified Realm, for the specified username, with the specified role names (as Strings). |
| public | GenericPrincipal(String
The username of the user represented by this Principal name, String Unused password, List<String> List of roles (must be Strings) possessed by this user roles, Principal - the principal to be returned from the request getUserPrincipal call if not null; if null,
this will be returned userPrincipal, LoginContext - If provided, this will be used to log out the user at the appropriate time loginContext, GSSCredential - If provided, the user's delegated credentials gssCredential)
Deprecated
This method will be removed in Tomcat 11 onwards
Construct a new Principal, associated with the specified Realm, for the specified username, with the specified role names (as Strings). |
| Modifier and Type | Method and Description |
|---|---|
| public Object | getAttribute(String
a name)String specifying the name of the attributeImplements org. Returns the value of the named attribute as an |
| public Enumeration | getAttributeNames()
Implements org. Returns an |
| public GSSCredential | |
| public String | |
| public String[] | |
| public Principal | |
| public boolean | |
| public void | logout()
Implements org. Calls logout, if necessary, on any associated JAASLoginContext and/or GSSContext. |
| protected void | |
| public String | toString()
Overrides java. Implements java. Return a String representation of this object, which exposes only information that should be public. |
| private Object |
| attributes | back to summary |
|---|---|
| protected final Map<String, Object> attributes The additional attributes associated with this Principal. | |
| gssCredential | back to summary |
|---|---|
| protected transient GSSCredential gssCredential The user's delegated credentials. | |
| loginContext | back to summary |
|---|---|
| protected final transient LoginContext loginContext The JAAS LoginContext, if any, used to authenticate this Principal. Kept so we can call logout(). | |
| name | back to summary |
|---|---|
| protected final String name The username of the user represented by this Principal. | |
| roles | back to summary |
|---|---|
| protected final String[] roles The set of roles associated with this user. | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| userPrincipal | back to summary |
|---|---|
| protected final Principal userPrincipal The authenticated Principal to be exposed to applications. | |
| GenericPrincipal | back to summary |
|---|---|
| public GenericPrincipal(String name) Construct a new Principal, associated with the specified Realm, for the specified username, with no roles.
| |
| GenericPrincipal | back to summary |
|---|---|
| public GenericPrincipal(String name, List<String> roles) Construct a new Principal, associated with the specified Realm, for the specified username, with the specified role names (as Strings). | |
| GenericPrincipal | back to summary |
|---|---|
| public GenericPrincipal(String name, String password, List<String> roles)
Deprecated This method will be removed in Tomcat 11 onwards Construct a new Principal, associated with the specified Realm, for the specified username, with the specified role names (as Strings).
| |
| GenericPrincipal | back to summary |
|---|---|
| public GenericPrincipal(String name, List<String> roles, Principal userPrincipal) Construct a new Principal, associated with the specified Realm, for the specified username, with the specified role names (as Strings). | |
| GenericPrincipal | back to summary |
|---|---|
| public GenericPrincipal(String name, String password, List<String> roles, Principal userPrincipal)
Deprecated This method will be removed in Tomcat 11 onwards Construct a new Principal, associated with the specified Realm, for the specified username, with the specified role names (as Strings).
| |
| GenericPrincipal | back to summary |
|---|---|
| public GenericPrincipal(String name, List<String> roles, Principal userPrincipal, LoginContext loginContext) Construct a new Principal, associated with the specified Realm, for the specified username, with the specified role names (as Strings).
| |
| GenericPrincipal | back to summary |
|---|---|
| public GenericPrincipal(String name, String password, List<String> roles, Principal userPrincipal, LoginContext loginContext)
Deprecated This method will be removed in Tomcat 11 onwards Construct a new Principal, associated with the specified Realm, for the specified username, with the specified role names (as Strings).
| |
| GenericPrincipal | back to summary |
|---|---|
| public GenericPrincipal(String name, List<String> roles, Principal userPrincipal, LoginContext loginContext, GSSCredential gssCredential, Map<String, Object> attributes) Construct a new Principal, associated with the specified Realm, for the specified username, with the specified role names (as Strings).
| |
| GenericPrincipal | back to summary |
|---|---|
| public GenericPrincipal(String name, String password, List<String> roles, Principal userPrincipal, LoginContext loginContext, GSSCredential gssCredential)
Deprecated This method will be removed in Tomcat 11 onwards Construct a new Principal, associated with the specified Realm, for the specified username, with the specified role names (as Strings).
| |
| getAttribute | back to summary |
|---|---|
| public Object getAttribute(String name) Implements org. Doc from org. Returns the value of the named attribute as an Only the servlet container may set attributes to make available custom information about a Principal or the user it represents.
The purpose of the method is to implement read only access to attributes
which may be stored in the
As using this method from application code will make it non portable to
other EE compliant containers, it is advised this should never be used
as an object storage facility tied to the
| |
| getAttributeNames | back to summary |
|---|---|
| public Enumeration Implements org. Doc from org. Returns an
| |
| getGssCredential | back to summary |
|---|---|
| public GSSCredential getGssCredential() Implements org.
| |
| getName | back to summary |
|---|---|
| public String getName() Implements java. Doc from java. Returns the name of this | |
| getRoles | back to summary |
|---|---|
| public String[] getRoles() | |
| getUserPrincipal | back to summary |
|---|---|
| public Principal getUserPrincipal() Implements org.
| |
| hasRole | back to summary |
|---|---|
| public boolean hasRole(String role) Does the user represented by this Principal possess the specified role?
| |
| logout | back to summary |
|---|---|
| public void logout() throws Exception Implements org. Doc from org. Calls logout, if necessary, on any associated JAASLoginContext and/or GSSContext. May in the future be extended to cover other logout requirements. | |
| setGssCredential | back to summary |
|---|---|
| protected void setGssCredential(GSSCredential gssCredential) | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Implements java. Return a String representation of this object, which exposes only information that should be public.
| |
| writeReplace | back to summary |
|---|---|
| private Object writeReplace() | |
| Modifier and Type | Field and Description |
|---|---|
| private final Map | |
| private final String | |
| private final Principal | |
| private final String[] | |
| private static final long |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| private Object |
| attributes | back to summary |
|---|---|
| private final Map<String, Object> attributes | |
| name | back to summary |
|---|---|
| private final String name | |
| principal | back to summary |
|---|---|
| private final Principal principal | |
| roles | back to summary |
|---|---|
| private final String[] roles | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| SerializablePrincipal | back to summary |
|---|---|
| pack-priv SerializablePrincipal(String name, String[] roles, Principal principal, Map<String, Object> attributes) | |
| readResolve | back to summary |
|---|---|
| private Object readResolve() | |