Documentation
¶
Overview ¶
Package signature set provides a data structure describing a set of HTTP message signatures.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MultipleSignaturesError ¶
func (MultipleSignaturesError) Error ¶
func (e MultipleSignaturesError) Error() string
type Set ¶
Set of signatures in an HTTP request.
The index of the map is the label given to the signatures. When parsing signatures do not rely upon the label, use the tag in the signature params instead.
func Unmarshal ¶
Unmarshal a set of signatures from an HTTP request, by reading the Signature-Input and Signature headers.
The Signature-Input field identifies the covered components and parameters that describe how the signature was generated, while the Signature field contains the signature value. Each field MAY contain multiple labeled values.
An HTTP message signature is identified by a label within an HTTP message. This label MUST be unique within a given HTTP message and MUST be used in both the Signature-Input field and the Signature field. The label is chosen by the signer, except where a specific label is dictated by protocol negotiations such as those described in Section 5.
An HTTP message signature MUST use both the Signature-Input field and the Signature field, and each field MUST contain the same labels. The presence of a label in one field but not the other is an error.
func (*Set) Add ¶
Add a signature message to the set.
Add() gives a label such as 'sig1' 'sig2', 'sig3' etc to the message.
To customise the label, add the message to the Messages field directly.