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

## Class DefaultJWTCallerPrincipalFactory

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

-     public class DefaultJWTCallerPrincipalFactory
      extends JWTCallerPrincipalFactory

  A default implementation of the abstract JWTCallerPrincipalFactory that uses the Keycloak token parsing classes.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DefaultJWTCallerPrincipalFactory()` Tries to load the JWTAuthContextInfo from CDI if the class level authContextInfo has not been set.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `JWTCallerPrincipal` | `parse(String token, JWTAuthContextInfo authContextInfo)` Parse the given bearer token string into a JWTCallerPrincipal instance.

    - ### Methods inherited from class org.wildfly.swarm.microprofile.jwtauth.deployment.principal.JWTCallerPrincipalFactory

      `instance, setInstance`

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

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

- - ### Constructor Detail

    - #### DefaultJWTCallerPrincipalFactory

          public DefaultJWTCallerPrincipalFactory()

      Tries to load the JWTAuthContextInfo from CDI if the class level authContextInfo has not been set.

  - ### Method Detail

    - #### parse

          public JWTCallerPrincipal parse(String token,
                                          JWTAuthContextInfo authContextInfo)
                                   throws ParseException

      Description copied from class: `JWTCallerPrincipalFactory`
      Parse the given bearer token string into a JWTCallerPrincipal instance.
      Specified by:
        `parse` in class `JWTCallerPrincipalFactory`
      Parameters:
        `token` - - the bearer token provided for authorization
      Returns:
        A JWTCallerPrincipal representation for the token.
      Throws:
        `ParseException` - on parse or verification failure.

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