Class JOSEHeader.AlgorithmBuilder

java.lang.Object
de.christofreichardt.json.websignature.JOSEHeader.AlgorithmBuilder
Enclosing class:
JOSEHeader

public static class JOSEHeader.AlgorithmBuilder extends Object
A builder for a JOSEHeader preconfigured with the "alg" parameter.
Author:
Christof Reichardt
  • Constructor Details

    • AlgorithmBuilder

      public AlgorithmBuilder(String alg)
      Creates the builder preconfigured with given "alg" parameter.
      Parameters:
      alg - denotes the algorithm.
      See Also:
  • Method Details

    • withTyp

      public JOSEHeader.AlgorithmBuilder withTyp(String typ)
      Augments the builder instance with the "typ" parameter.
      Parameters:
      typ - denotes the (media) type.
      Returns:
      this AlgorithmBuilder instance.
      See Also:
    • withKid

      public JOSEHeader.AlgorithmBuilder withKid(String kid)
      Augments the builder instance with the "kid" parameter.
      Parameters:
      kid - denotes the key ID.
      Returns:
      this AlgorithmBuilder instance.
      See Also:
    • build

      public JOSEHeader build()
      Builds the JOSEHeader instance with the configured parameters.
      Returns:
      the appropriately configured JOSEHeader instance