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

Type Parameters:
A - the JWK type generated by the builder
B - the JWK generator type
All Known Subinterfaces:
ECJWKGenerator<A,B>, EdECJWKGenerator<A,B>, OCTJWKGenerator<A,B>, OKPJWKGenerator<A,B,C,D>, PBES2JWKGenerator<A,B>, RSAJWKGenerator<A,B>, X509JWKGenerator<A,B,C,D>, XECJWKGenerator<A,B>

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

a JWK generator is used to generate 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 generates a new key.
    Specifies 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 generator
    • 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 generator
    • keyId

      B keyId(String kid)

      Specifies the key id that uniquely identifies the key.

      Parameters:
      kid - a unique key id
      Returns:
      this generator
    • algorithm

      B algorithm(String alg)

      Specifies the algorithm intended for use with the key.

      Parameters:
      alg - a JWA algorithm
      Returns:
      this generator
    • generate

      Returns a single publisher that generates a new key.

      Returns:
      a single key publisher
      Throws:
      JWKGenerateException - if there was an error generating the key
      JWKProcessingException - if there was a processing error