org.wildfly.swarm.microprofile.jwtauth.deployment.auth.cdi

## Class MPJWTProducer

- java.lang.Object
- - org.wildfly.swarm.microprofile.jwtauth.deployment.auth.cdi.MPJWTProducer

-     public class MPJWTProducer
      extends Object

  A class that tracks the current validated MP-JWT and associated JsonWebToken via a thread local to provide a @RequestScoped JsonWebToken producer method. It also provides utility methods for access the current JsonWebToken claim values.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `MPJWTProducer()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static JsonWebToken` | `getJWTPrincpal()`
    `static <T> T` | `getValue(String name, boolean isOptional)`
    `static void` | `setJWTPrincipal(JsonWebToken principal)`

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

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

- - ### Constructor Detail

    - #### MPJWTProducer

          public MPJWTProducer()

  - ### Method Detail

    - #### setJWTPrincipal

          public static void setJWTPrincipal(JsonWebToken principal)

    - #### getJWTPrincpal

          public static JsonWebToken getJWTPrincpal()

    - #### getValue

          public static <T> T getValue(String name,
                                       boolean isOptional)

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