com.holonplatform.auth.jwt

## Interface JwtAuthenticator.Builder

- All Known Implementing Classes:
    DefaultJwtAuthenticator.DefaultBuilder
  Enclosing interface:
    JwtAuthenticator

      public static interface JwtAuthenticator.Builder

  Builder to create `JwtAuthenticator` instances
  Since:
    5.0.0

- - ### Method Summary

    All Methods Instance Methods Abstract Methods Default Methods Deprecated 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.
    `default JwtAuthenticator.Builder` | `requiredClaim(String claim)` Deprecated. Use `withRequiredClaim(String)`
    `JwtAuthenticator.Builder` | `withRequiredClaim(String claim)` Add a required JWT claim: specified claim must exist in JWT token, otherwise authentication will fail.

- - ### Method Detail

    - #### configuration

          JwtAuthenticator.Builder configuration(JwtConfiguration configuration)

      Set the `JwtConfiguration` to use to perform authentication and token validation
      Parameters:
        `configuration` - JwtConfiguration (not null)
      Returns:
        this

    - #### issuer

          JwtAuthenticator.Builder issuer(String issuer)

      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.

      Parameters:
        `issuer` - Issuer to add (not null)
      Returns:
        this

    - #### withRequiredClaim

          JwtAuthenticator.Builder withRequiredClaim(String claim)

      Add a required JWT claim: specified claim must exist in JWT token, otherwise authentication will fail.
      Parameters:
        `claim` - Claim to add (not null)
      Returns:
        this

    - #### requiredClaim

          @Deprecated
          default JwtAuthenticator.Builder requiredClaim(String claim)

      Deprecated. Use `withRequiredClaim(String)`
      Add a required JWT claim: specified claim must exist in JWT token, otherwise authentication will fail.
      Parameters:
        `claim` - Claim to add (not null)
      Returns:
        this

    - #### build

          JwtAuthenticator build()

      Build the JwtAuthenticator
      Returns:
        JwtAuthenticator

Copyright © 2019 The Holon Platform. All rights reserved.