com.holonplatform.auth.jwt.internal

## Enum DefaultJwtTokenBuilder

- java.lang.Object
- - java.lang.Enum<DefaultJwtTokenBuilder>
  - - com.holonplatform.auth.jwt.internal.DefaultJwtTokenBuilder

- All Implemented Interfaces:
    JwtTokenBuilder, Serializable, Comparable<DefaultJwtTokenBuilder>

      public enum DefaultJwtTokenBuilder
      extends Enum<DefaultJwtTokenBuilder>
      implements JwtTokenBuilder

  Default `JwtTokenBuilder` implementation.
  Since:
    5.1.0

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface com.holonplatform.auth.jwt.JwtTokenBuilder

      `JwtTokenBuilder.AuthPart`

  - ### Enum Constant Summary

    Enum Constants
    Enum Constant and Description
    `INSTANCE`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `buildJwt(JwtConfiguration configuration, Authentication authentication, String jwtTokenId)` Build a JSON Web Token using given `JwtConfiguration` for given `Authentication`.
    `static DefaultJwtTokenBuilder` | `valueOf(String name)` Returns the enum constant of this type with the specified name.
    `static DefaultJwtTokenBuilder[]` | `values()` Returns an array containing the constants of this enum type, in the order they are declared.

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

      `compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

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

      `getClass, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface com.holonplatform.auth.jwt.JwtTokenBuilder

      `buildJwt, buildJwtToken, get`

- - ### Enum Constant Detail

    - #### INSTANCE

          public static final DefaultJwtTokenBuilder INSTANCE

  - ### Method Detail

    - #### values

          public static DefaultJwtTokenBuilder[] values()

      Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:

          for (DefaultJwtTokenBuilder c : DefaultJwtTokenBuilder.values())
              System.out.println(c);

      Returns:
        an array containing the constants of this enum type, in the order they are declared

    - #### valueOf

          public static DefaultJwtTokenBuilder valueOf(String name)

      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
        `name` - the name of the enum constant to be returned.
      Returns:
        the enum constant with the specified name
      Throws:
        `IllegalArgumentException` - if this enum type has no constant with the specified name
        `NullPointerException` - if the argument is null

    - #### buildJwt

          public String buildJwt(JwtConfiguration configuration,
                                 Authentication authentication,
                                 String jwtTokenId)
                          throws JwtConfiguration.InvalidJwtConfigurationException

      Description copied from interface: `JwtTokenBuilder`
      Build a JSON Web Token using given `JwtConfiguration` for given `Authentication`.
      Specified by:
        `buildJwt` in interface `JwtTokenBuilder`
      Parameters:
        `configuration` - JWT configuration (not null)
        `authentication` - Authentication for which to create the JWT (not null)
        `jwtTokenId` - JWT token id (jit claim)
      Returns:
        The JWT representation
      Throws:
        `JwtConfiguration.InvalidJwtConfigurationException` - Invalid JWT configuration

Copyright © 2019 The Holon Platform. All rights reserved.