Class JsonWebSecretKey.SecretKeyBuilder

java.lang.Object
de.christofreichardt.json.webkey.JsonWebKey.Builder<JsonWebSecretKey.SecretKeyBuilder>
de.christofreichardt.json.webkey.JsonWebSecretKey.SecretKeyBuilder
Enclosing class:
JsonWebSecretKey

public static class JsonWebSecretKey.SecretKeyBuilder extends JsonWebKey.Builder<JsonWebSecretKey.SecretKeyBuilder>
A JsonWebKey.Builder for building JsonWebSecretKeys by providing a SecretKey.
Author:
Christof Reichardt
  • Constructor Details

    • SecretKeyBuilder

      public SecretKeyBuilder(SecretKey secretKey) throws IllegalArgumentException
      Creates the JsonWebSecretKey.SecretKeyBuilder preconfigured with the given SecretKey.
      Parameters:
      secretKey - the to be used algorithm
      Throws:
      IllegalArgumentException - if the requested algorithm is not supported
  • Method Details

    • build

      public JsonWebSecretKey build()
      Builds the JsonWebSecretKey with the configured SecretKey.
      Returns:
      the appropriately configured JsonWebSecretKey instance