TomcatPrincipal (Apache Tomcat 9.0.37 API Documentation)

org.apache.catalina

## Interface TomcatPrincipal

- All Superinterfaces:
    Principal
  All Known Implementing Classes:
    GenericPrincipal

      public interface TomcatPrincipal
      extends Principal

  Defines additional methods implemented by `Principal`s created by Tomcat's standard `Realm` implementations.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `GSSCredential` | `getGssCredential()`
    `Principal` | `getUserPrincipal()`
    `void` | `logout()` Calls logout, if necessary, on any associated JAASLoginContext and/or GSSContext.

    - ### Methods inherited from interface java.security.Principal

      `equals, getName, hashCode, implies, toString`

- - ### Method Detail

    - #### getUserPrincipal

          Principal getUserPrincipal()

      Returns:
        The authenticated Principal to be exposed to applications.

    - #### getGssCredential

          GSSCredential getGssCredential()

      Returns:
        The user's delegated credentials.

    - #### logout

          void logout()
               throws Exception

      Calls logout, if necessary, on any associated JAASLoginContext and/or GSSContext. May in the future be extended to cover other logout requirements.
      Throws:
        `Exception` - If something goes wrong with the logout. Uses Exception to allow for future expansion of this method to cover other logout mechanisms that might throw a different exception to LoginContext

Copyright © 2000-2020 Apache Software Foundation. All Rights Reserved.