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

## Class JWTAuthMechanismFactory

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

-     public class JWTAuthMechanismFactory
      extends Object

  An AuthenticationMechanismFactory for the MicroProfile JWT RBAC

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `JWTAuthMechanismFactory()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `AuthenticationMechanism` | `create(String mechanismName, FormParserFactory formParserFactory, Map<String,String> properties)` This builds the JWTAuthMechanism with a JWTAuthContextInfo containing the issuer and signer public key needed to validate the token.
    `void` | `init()`

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

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

- - ### Constructor Detail

    - #### JWTAuthMechanismFactory

          public JWTAuthMechanismFactory()

  - ### Method Detail

    - #### init

          @PostConstruct
          public void init()

    - #### create

          public AuthenticationMechanism create(String mechanismName,
                                                FormParserFactory formParserFactory,
                                                Map<String,String> properties)

      This builds the JWTAuthMechanism with a JWTAuthContextInfo containing the issuer and signer public key needed to validate the token. This information is currently taken from the query parameters passed in via the web.xml/login-config/auth-method value, or via CDI injection.
      Parameters:
        `mechanismName` - - the login-config/auth-method, which will be MP-JWT for JWTAuthMechanism
        `formParserFactory` - - unused form type of authentication factory
        `properties` - - the query parameters from the web.xml/login-config/auth-method value. We look for an issuedBy and signerPubKey property to use for token validation.
      Returns:
        the JWTAuthMechanism
      See Also:
        `JWTAuthContextInfo`

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