Interface JWKBuilder<A extends JWK,B extends JWKBuilder<A,B>>

Type Parameters:
A - the JWK type built by the builder
B - the JWK builder type
All Known Subinterfaces:
ECJWKBuilder<A,B>, EdECJWKBuilder<A,B>, OCTJWKBuilder<A,B>, OKPJWKBuilder<A,B,C,D>, PBES2JWKBuilder<A,B>, RSAJWKBuilder<A,B>, X509JWKBuilder<A,B,C,D>, XECJWKBuilder<A,B>

public interface JWKBuilder<A extends JWK,B extends JWKBuilder<A,B>>

A JWK builder is used to build JSON Web Keys.

Since:
1.5
Author:
Jeremy Kuhn
  • Method Summary

    Modifier and Type
    Method
    Description
    Specifies the algorithm intended for use with the key.
    Returns a single publisher that builds the key.
    Specified the key id that uniquely identifies the key.
    keyOperations(String... key_ops)
    Specifies the set of key operations for which the key is intended to be used.
    Specifies the public key use.
  • Method Details

    • publicKeyUse

      B publicKeyUse(String use)

      Specifies the public key use.

      Parameters:
      use - the public key use
      Returns:
      this builder
    • keyOperations

      B keyOperations(String... key_ops)

      Specifies the set of key operations for which the key is intended to be used.

      Parameters:
      key_ops - a list of key operations
      Returns:
      this builder
    • algorithm

      B algorithm(String alg)

      Specifies the algorithm intended for use with the key.

      Parameters:
      alg - a JWA algorithm
      Returns:
      this builder
    • keyId

      B keyId(String kid)

      Specified the key id that uniquely identifies the key.

      Parameters:
      kid - a unique key id
      Returns:
      this builder
    • build

      Returns a single publisher that builds the key.

      Returns:
      a single key publisher
      Throws:
      JWKBuildException - if there was an error building the key
      JWKResolveException - if there was an error resolving the key
      JWKProcessingException - if there was an error processing the key