Class SignatureParamsLine

java.lang.Object
com.authlete.hms.SignatureParamsLine

public class SignatureParamsLine extends Object
A class representing signature-params-line defined in RFC 9421 HTTP Message Signatures, Section 2.5. Creating the Signature Base.
See Also:
  • Constructor Details

    • SignatureParamsLine

      public SignatureParamsLine(SignatureMetadata metadata)
      A constructor with signature metadata.
      Parameters:
      metadata - Signature metadata.
      Throws:
      IllegalArgumentException - The signature metadata is null.
  • Method Details

    • toString

      public String toString()
      Get the string representation of this instance, which is the serialized signature params line returned by the serialize() method.
      Overrides:
      toString in class Object
      Returns:
      The string representation of this instance.
    • serialize

      public String serialize()
      Serialize the signature params line represented by this instance, and return the resulting string.
      Returns:
      The serialized signature params line represented by this instance.
    • serializeTo

      public StringBuilder serializeTo(StringBuilder sb)
      Serialize the signature params line represented by this instance, and write the resulting string into the specified string builder.

      The ABNF for signature params line from RFC 9421 HTTP Message Signatures, 2.5. Creating the Signature Base:

       signature-params-line = DQUOTE "@signature-params" DQUOTE
            ":" SP inner-list
       
      Parameters:
      sb - A string builder into which the resulting string is written.
      Returns:
      The same string builder that was passed as the argument.
    • getMetadata

      public SignatureMetadata getMetadata()
      Get the signature metadata that has been passed to the constructor.
      Returns:
      The signature metadata.