CoyotePrincipal (Apache Tomcat 10.1.57 API Documentation)
Description: declaration: package: org.apache.catalina.connector, class: CoyotePrincipal

# Class CoyotePrincipal

java.lang.Object
org.apache.catalina.connector.CoyotePrincipal

All Implemented Interfaces:
  `Serializable, Principal`

public class CoyotePrincipal extends Object implements Principal, Serializable
Generic implementation of java.security.Principal that is used to represent principals authenticated at the protocol handler level.

See Also:
  - Serialized Form

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected final String`
  `name`
  The username of the user represented by this Principal.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `CoyotePrincipal(String name)`
  Construct a new CoyotePrincipal.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `equals(Object obj)`
  `String`
  `getName()`
  `int`
  `hashCode()`
  `String`
  `toString()`
  Return a String representation of this object, which exposes only information that should be public.

  ### Methods inherited from class Object

  `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

  ### Methods inherited from interface Principal

  `implies`

- ## Field Details

  - ### name

    protected final String name
    The username of the user represented by this Principal.

- ## Constructor Details

  - ### CoyotePrincipal

    public CoyotePrincipal(String name)
    Construct a new CoyotePrincipal.
    Parameters:
      `name` - The name of the principal

- ## Method Details

  - ### getName

    public String getName()
    Specified by:
      `getName` in interface `Principal`

  - ### toString

    public String toString()
    Return a String representation of this object, which exposes only information that should be public.
    Specified by:
      `toString` in interface `Principal`
    Overrides:
      `toString` in class `Object`

  - ### equals

    public boolean equals(Object obj)
    Specified by:
      `equals` in interface `Principal`
    Overrides:
      `equals` in class `Object`

  - ### hashCode

    public int hashCode()
    Specified by:
      `hashCode` in interface `Principal`
    Overrides:
      `hashCode` in class `Object`