com.holonplatform.auth.jwt

## Interface JwtConfiguration.Builder

- Enclosing interface:
    JwtConfiguration

      public static interface JwtConfiguration.Builder

  Builder to create `JwtConfiguration` instances.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods Default 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)
    `default JwtConfiguration.Builder` | `sharedKeyBase64(String sharedKeyBase64encoded)` Set JWT signing shared key to use with symmetric signing algorithms (such as HMAC)
    `JwtConfiguration.Builder` | `signatureAlgorithm(JwtSignatureAlgorithm signatureAlgorithm)` Set JWT token signature algorithm

- - ### Method Detail

    - #### issuer

          JwtConfiguration.Builder issuer(String issuer)

      Set JWT token issuer
      Parameters:
        `issuer` - the issuer to set
      Returns:
        this

    - #### signatureAlgorithm

          JwtConfiguration.Builder signatureAlgorithm(JwtSignatureAlgorithm signatureAlgorithm)

      Set JWT token signature algorithm
      Parameters:
        `signatureAlgorithm` - Signature algorithm
      Returns:
        this

    - #### sharedKey

          JwtConfiguration.Builder sharedKey(byte[] sharedKey)

      Set JWT signing shared key to use with symmetric signing algorithms (such as HMAC)
      Parameters:
        `sharedKey` - the key to set
      Returns:
        this

    - #### sharedKeyBase64

          default JwtConfiguration.Builder sharedKeyBase64(String sharedKeyBase64encoded)

      Set JWT signing shared key to use with symmetric signing algorithms (such as HMAC)
      Parameters:
        `sharedKeyBase64encoded` - the key (Base64 encoded) to set
      Returns:
        this

    - #### publicKey

          JwtConfiguration.Builder publicKey(Key publicKey)

      Set JWT signing public key to use with asymmetric signing algorithms (such as RSA)
      Parameters:
        `publicKey` - the key to set
      Returns:
        this

    - #### privateKey

          JwtConfiguration.Builder privateKey(Key privateKey)

      Set JWT signing private key to use with asymmetric signing algorithms (such as RSA)
      Parameters:
        `privateKey` - the key to set
      Returns:
        this

    - #### expireTime

          JwtConfiguration.Builder expireTime(long expireTime)

      Set JWT token expire time
      Parameters:
        `expireTime` - Expire time in milliseconds
      Returns:
        this

    - #### notBeforeNow

          JwtConfiguration.Builder notBeforeNow(boolean notBeforeNow)

      Whether to set the `nbf` (not before) JWT claim to the timestamp at which the token is created.
      Parameters:
        `notBeforeNow` - `true` to set the `nbf` (not before) JWT claim to the timestamp at which the token is created.
      Returns:
        this

    - #### includeDetails

          JwtConfiguration.Builder includeDetails(boolean includeDetails)

      Set whether to include `Authentication` details in JWT token generation
      Parameters:
        `includeDetails` - `true` to include `Authentication` details
      Returns:
        this

    - #### includePermissions

          JwtConfiguration.Builder includePermissions(boolean includePermissions)

      Set whether to include `Authentication` permissions in JWT token generation
      Parameters:
        `includePermissions` - `true` to include `Authentication` permissions
      Returns:
        this

    - #### build

          JwtConfiguration build()

      Build `JwtConfiguration` instance
      Returns:
        JwtConfiguration

Copyright © 2019 The Holon Platform. All rights reserved.