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

## Class MPJWTExtension

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

-     public class MPJWTExtension
      extends Object

  A CDI extension that provides a producer for the current authenticated JsonWebToken based on a thread local value that is managed by the `JWTAuthMechanism` request authentication handler. This also installs the producer methods for the discovered:
  - @Claim ClaimValue injection sites.
  - @Claim raw type injection sites.
  - @Claim JsonValue injection sites.
  See Also:
    `JWTAuthMechanism`

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `MPJWTExtension.ClaimIP` The representation of an @Claim annotated injection site
    `static class` | `MPJWTExtension.ClaimIPType` A key for a claim,injection site type pair

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `MPJWTExtension()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addTypeToClaimProducer(ProcessBeanAttributes pba)` Replace the general producer method BeanAttributes with one bound to the collected injection site types to properly reflect all of the type locations the producer method applies to.
    `void` | `afterDeploymentValidation(AfterDeploymentValidation event, BeanManager beanManager)`
    `void` | `observeBeforeBeanDiscovery(BeforeBeanDiscovery bbd, BeanManager beanManager)` Register the MPJWTProducer JsonWebToken producer bean

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

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

- - ### Constructor Detail

    - #### MPJWTExtension

          public MPJWTExtension()

  - ### Method Detail

    - #### observeBeforeBeanDiscovery

          public void observeBeforeBeanDiscovery(BeforeBeanDiscovery bbd,
                                                 BeanManager beanManager)

      Register the MPJWTProducer JsonWebToken producer bean
      Parameters:
        `bbd` - before discovery event
        `beanManager` - cdi bean manager

    - #### addTypeToClaimProducer

          public void addTypeToClaimProducer(ProcessBeanAttributes pba)

      Replace the general producer method BeanAttributes with one bound to the collected injection site types to properly reflect all of the type locations the producer method applies to.
      Parameters:
        `pba` - the ProcessBeanAttributes
      See Also:
        `ClaimProviderBeanAttributes`

    - #### afterDeploymentValidation

          public void afterDeploymentValidation(AfterDeploymentValidation event,
                                                BeanManager beanManager)

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