Class JwkOctet.Builder

java.lang.Object
io.helidon.security.jwt.jwk.JwkOctet.Builder
All Implemented Interfaces:
Builder<JwkOctet.Builder,JwkOctet>, Supplier<JwkOctet>
Enclosing class:
JwkOctet

public static final class JwkOctet.Builder extends Object implements Builder<JwkOctet.Builder,JwkOctet>
Builder for JwkOctet.
  • Method Details

    • fromJson

      public JwkOctet.Builder fromJson(JsonObject json)
      Update this builder from JWK in json format. Note that the "k" must be base64 encoded.
      Parameters:
      json - JsonObject with the JWK
      Returns:
      updated builder instance, just call build() to build the JwkOctet instance
      See Also:
    • build

      public JwkOctet build()
      Build a new JwkOctet instance from this builder.
      Specified by:
      build in interface Builder<JwkOctet.Builder,JwkOctet>
      Returns:
      instance of JwkOctet configured from this builder
    • keyType

      public JwkOctet.Builder keyType(String keyType)
      Key type of the key being built.
      Parameters:
      keyType - one of supported key types
      Returns:
      updated builder instance
      See Also:
    • keyId

      public JwkOctet.Builder keyId(String keyId)
      Key id of the key being built. Note that within one set of keys JwkKeys this must be unique.
      Parameters:
      keyId - key id to map from a signed entity (such as JWT) to JWK definition
      Returns:
      updated builder instance
    • algorithm

      public JwkOctet.Builder algorithm(String algorithm)
      Algorithm of the key being built. Algorithm is optional (each type may have a reasonable default).
      Parameters:
      algorithm - see each key type for supported algorithms
      Returns:
      updated builder instance
      See Also:
    • usage

      public JwkOctet.Builder usage(String usage)
      Intended usage of this JWK. You may configure usage, operations or neither (never both).
      Parameters:
      usage - usage of this JWK
      Returns:
      updated builder instance
      See Also:
    • operations

      public JwkOctet.Builder operations(List<String> operations)
      Intended operations of this JWK. You may configure operations, usage or neither (never both).
      Parameters:
      operations - operations to use, replaces existing operations
      Returns:
      updated builder instance
    • addOperation

      public JwkOctet.Builder addOperation(String operation)
      Add intended operation of this JWK. You may configure operations, usage or neither (never both).
      Parameters:
      operation - operation to add to list of operations
      Returns:
      updated builder instance