Class SignatureMetadata

All Implemented Interfaces:
Serializable, Cloneable, Iterable<ComponentIdentifier>, Collection<ComponentIdentifier>, List<ComponentIdentifier>, RandomAccess, SequencedCollection<ComponentIdentifier>

public class SignatureMetadata extends ArrayList<ComponentIdentifier>
Signature metadata.

From the first paragraph of RFC 9421, Section 2.3. Signature Parameters:

HTTP message signatures have metadata properties that provide information regarding the signature's generation and verification, consisting of the ordered set of covered components and the ordered set of parameters, where the parameters include a timestamp of signature creation, identifiers for verification key material, and other utilities. This metadata is represented by a special message component in the signature base for signature parameters; this special message component is treated slightly differently from other message components.

See Also:
  • Constructor Details

    • SignatureMetadata

      public SignatureMetadata()
      The default constructor.
    • SignatureMetadata

      public SignatureMetadata(SignatureMetadataParameters parameters)
      A constructor with signature metadata parameters.
      Parameters:
      parameters - Signature metadata parameters.
    • SignatureMetadata

      public SignatureMetadata(Collection<? extends ComponentIdentifier> identifiers)
      A constructor with component identifiers.
      Parameters:
      identifiers - Component identifiers.
    • SignatureMetadata

      public SignatureMetadata(Collection<? extends ComponentIdentifier> identifiers, SignatureMetadataParameters parameters)
      A constructor with component identifiers and signature metadata parameters.
      Parameters:
      identifiers - Component identifiers.
      parameters - Signature metadata parameters.
  • Method Details

    • toString

      public String toString()
      Get the string representation of this instance, which is the serialized signature metadata returned by the serialize() method.
      Overrides:
      toString in class AbstractCollection<ComponentIdentifier>
      Returns:
      The string representation of this instance.
    • serialize

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

      public StringBuilder serializeTo(StringBuilder sb)
      Serialize the signature metadata represented by this instance, and write the resulting string into the specified string builder.
      Parameters:
      sb - A string builder into which the resulting string is written.
      Returns:
      The same string builder that was passed as the argument.
    • getParameters

      public SignatureMetadataParameters getParameters()
      Get the signature metadata parameters.
      Returns:
      The signature metadata parameters.