org.wildfly.swarm.microprofile.jwtauth.deployment.principal

## Class JWTCallerPrincipal

- java.lang.Object
- - org.wildfly.swarm.microprofile.jwtauth.deployment.principal.JWTCallerPrincipal

- Direct Known Subclasses:
    DefaultJWTCallerPrincipal

      public abstract class JWTCallerPrincipal
      extends Object

  An abstract CallerPrincipal implementation that provides access to the JWT claims that are required by the microprofile token.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `JWTCallerPrincipal(String name)` Create a JWTCallerPrincipal with the caller's name

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `<T> Optional<T>` | `claim(String claimName)`
    `String` | `getName()`
    `abstract String` | `toString(boolean showAll)` Generate a human readable version of the caller principal and associated JWT.

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### JWTCallerPrincipal

          public JWTCallerPrincipal(String name)

      Create a JWTCallerPrincipal with the caller's name
      Parameters:
        `name` - - caller's name

  - ### Method Detail

    - #### getName

          public String getName()

    - #### toString

          public abstract String toString(boolean showAll)

      Generate a human readable version of the caller principal and associated JWT.
      Parameters:
        `showAll` - - should all claims associated with the JWT be displayed or should only those defined in the JsonWebToken interface be displayed.
      Returns:
        human readable presentation of the caller principal and associated JWT.

    - #### claim

          public <T> Optional<T> claim(String claimName)

Copyright © 2017 JBoss by Red Hat. All rights reserved.