com.holonplatform.auth.jwt.internal

## Class DefaultJwtAuthenticator.DefaultBuilder

- java.lang.Object
- - com.holonplatform.auth.jwt.internal.DefaultJwtAuthenticator.DefaultBuilder

- All Implemented Interfaces:
    JwtAuthenticator.Builder
  Enclosing class:
    DefaultJwtAuthenticator

      public static class DefaultJwtAuthenticator.DefaultBuilder
      extends Object
      implements JwtAuthenticator.Builder

  Default `Builder` implementation

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DefaultBuilder()` Constructor

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `JwtAuthenticator` | `build()` Build the JwtAuthenticator
    `JwtAuthenticator.Builder` | `configuration(JwtConfiguration configuration)` Set the `JwtConfiguration` to use to perform authentication and token validation
    `JwtAuthenticator.Builder` | `issuer(String issuer)` Add an allowed JWT issuer.
    `JwtAuthenticator.Builder` | `withRequiredClaim(String claim)` Add a required JWT claim: specified claim must exist in JWT token, otherwise authentication will fail.

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

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

    - ### Methods inherited from interface com.holonplatform.auth.jwt.JwtAuthenticator.Builder

      `requiredClaim`

- - ### Constructor Detail

    - #### DefaultBuilder

          public DefaultBuilder()

      Constructor

  - ### Method Detail

    - #### configuration

          public JwtAuthenticator.Builder configuration(JwtConfiguration configuration)

      Description copied from interface: `JwtAuthenticator.Builder`
      Set the `JwtConfiguration` to use to perform authentication and token validation
      Specified by:
        `configuration` in interface `JwtAuthenticator.Builder`
      Parameters:
        `configuration` - JwtConfiguration (not null)
      Returns:
        this

    - #### issuer

          public JwtAuthenticator.Builder issuer(String issuer)

      Description copied from interface: `JwtAuthenticator.Builder`
      Add an allowed JWT issuer.

      If one ore more allowed issuer is registered, JWT Issuer claim (iss) will be required and checked during token authentication: if token issuer doesn't match one of the given issuers, authentication will fail.

      Specified by:
        `issuer` in interface `JwtAuthenticator.Builder`
      Parameters:
        `issuer` - Issuer to add (not null)
      Returns:
        this

    - #### withRequiredClaim

          public JwtAuthenticator.Builder withRequiredClaim(String claim)

      Description copied from interface: `JwtAuthenticator.Builder`
      Add a required JWT claim: specified claim must exist in JWT token, otherwise authentication will fail.
      Specified by:
        `withRequiredClaim` in interface `JwtAuthenticator.Builder`
      Parameters:
        `claim` - Claim to add (not null)
      Returns:
        this

    - #### build

          public JwtAuthenticator build()

      Description copied from interface: `JwtAuthenticator.Builder`
      Build the JwtAuthenticator
      Specified by:
        `build` in interface `JwtAuthenticator.Builder`
      Returns:
        JwtAuthenticator

Copyright © 2019 The Holon Platform. All rights reserved.