com.holonplatform.auth.jwt.internal

## Class DefaultJwtConfiguration.ConfigurationBuilder

- java.lang.Object
- - com.holonplatform.auth.jwt.internal.DefaultJwtConfiguration.ConfigurationBuilder

- All Implemented Interfaces:
    JwtConfiguration.Builder
  Enclosing class:
    DefaultJwtConfiguration

      public static class DefaultJwtConfiguration.ConfigurationBuilder
      extends Object
      implements JwtConfiguration.Builder

  Default `Builder` implementation.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ConfigurationBuilder()` Constructor

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `JwtConfiguration` | `build()` Build `JwtConfiguration` instance
    `JwtConfiguration.Builder` | `expireTime(long expireTime)` Set JWT token expire time
    `JwtConfiguration.Builder` | `includeDetails(boolean includeDetails)` Set whether to include `Authentication` details in JWT token generation
    `JwtConfiguration.Builder` | `includePermissions(boolean includePermissions)` Set whether to include `Authentication` permissions in JWT token generation
    `JwtConfiguration.Builder` | `issuer(String issuer)` Set JWT token issuer
    `JwtConfiguration.Builder` | `notBeforeNow(boolean notBeforeNow)` Whether to set the `nbf` (not before) JWT claim to the timestamp at which the token is created.
    `JwtConfiguration.Builder` | `privateKey(Key privateKey)` Set JWT signing private key to use with asymmetric signing algorithms (such as RSA)
    `JwtConfiguration.Builder` | `publicKey(Key publicKey)` Set JWT signing public key to use with asymmetric signing algorithms (such as RSA)
    `JwtConfiguration.Builder` | `sharedKey(byte[] sharedKey)` Set JWT signing shared key to use with symmetric signing algorithms (such as HMAC)
    `JwtConfiguration.Builder` | `signatureAlgorithm(JwtSignatureAlgorithm signatureAlgorithm)` Set JWT token signature algorithm

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

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

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

      `sharedKeyBase64`

- - ### Constructor Detail

    - #### ConfigurationBuilder

          public ConfigurationBuilder()

      Constructor

  - ### Method Detail

    - #### issuer

          public JwtConfiguration.Builder issuer(String issuer)

      Description copied from interface: `JwtConfiguration.Builder`
      Set JWT token issuer
      Specified by:
        `issuer` in interface `JwtConfiguration.Builder`
      Parameters:
        `issuer` - the issuer to set
      Returns:
        this

    - #### signatureAlgorithm

          public JwtConfiguration.Builder signatureAlgorithm(JwtSignatureAlgorithm signatureAlgorithm)

      Description copied from interface: `JwtConfiguration.Builder`
      Set JWT token signature algorithm
      Specified by:
        `signatureAlgorithm` in interface `JwtConfiguration.Builder`
      Parameters:
        `signatureAlgorithm` - Signature algorithm
      Returns:
        this

    - #### sharedKey

          public JwtConfiguration.Builder sharedKey(byte[] sharedKey)

      Description copied from interface: `JwtConfiguration.Builder`
      Set JWT signing shared key to use with symmetric signing algorithms (such as HMAC)
      Specified by:
        `sharedKey` in interface `JwtConfiguration.Builder`
      Parameters:
        `sharedKey` - the key to set
      Returns:
        this

    - #### publicKey

          public JwtConfiguration.Builder publicKey(Key publicKey)

      Description copied from interface: `JwtConfiguration.Builder`
      Set JWT signing public key to use with asymmetric signing algorithms (such as RSA)
      Specified by:
        `publicKey` in interface `JwtConfiguration.Builder`
      Parameters:
        `publicKey` - the key to set
      Returns:
        this

    - #### privateKey

          public JwtConfiguration.Builder privateKey(Key privateKey)

      Description copied from interface: `JwtConfiguration.Builder`
      Set JWT signing private key to use with asymmetric signing algorithms (such as RSA)
      Specified by:
        `privateKey` in interface `JwtConfiguration.Builder`
      Parameters:
        `privateKey` - the key to set
      Returns:
        this

    - #### expireTime

          public JwtConfiguration.Builder expireTime(long expireTime)

      Description copied from interface: `JwtConfiguration.Builder`
      Set JWT token expire time
      Specified by:
        `expireTime` in interface `JwtConfiguration.Builder`
      Parameters:
        `expireTime` - Expire time in milliseconds
      Returns:
        this

    - #### notBeforeNow

          public JwtConfiguration.Builder notBeforeNow(boolean notBeforeNow)

      Description copied from interface: `JwtConfiguration.Builder`
      Whether to set the `nbf` (not before) JWT claim to the timestamp at which the token is created.
      Specified by:
        `notBeforeNow` in interface `JwtConfiguration.Builder`
      Parameters:
        `notBeforeNow` - `true` to set the `nbf` (not before) JWT claim to the timestamp at which the token is created.
      Returns:
        this

    - #### includeDetails

          public JwtConfiguration.Builder includeDetails(boolean includeDetails)

      Description copied from interface: `JwtConfiguration.Builder`
      Set whether to include `Authentication` details in JWT token generation
      Specified by:
        `includeDetails` in interface `JwtConfiguration.Builder`
      Parameters:
        `includeDetails` - `true` to include `Authentication` details
      Returns:
        this

    - #### includePermissions

          public JwtConfiguration.Builder includePermissions(boolean includePermissions)

      Description copied from interface: `JwtConfiguration.Builder`
      Set whether to include `Authentication` permissions in JWT token generation
      Specified by:
        `includePermissions` in interface `JwtConfiguration.Builder`
      Parameters:
        `includePermissions` - `true` to include `Authentication` permissions
      Returns:
        this

    - #### build

          public JwtConfiguration build()

      Description copied from interface: `JwtConfiguration.Builder`
      Build `JwtConfiguration` instance
      Specified by:
        `build` in interface `JwtConfiguration.Builder`
      Returns:
        JwtConfiguration

Copyright © 2019 The Holon Platform. All rights reserved.