Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Base ¶
type Base struct {
Values map[string]string
// Header is an HTTP header with
// key/value pairs that have been added to the base.
//
// Header is intended for use in HTTP request middleware
// rather than for signature verification.
//
// The header values are copied as-is from the input request
// and whitespace trimming / obsolete line folding is not
// performed on these.
Header http.Header
}
The signature base is used to derive the canonicalized HTTP message components covered by the signature.
See: https://www.rfc-editor.org/rfc/rfc9421.html#name-creating-the-signature-base
func Derive ¶
func Derive(params sigparams.Params, w http.ResponseWriter, req *http.Request, digester contentdigest.Digester) (*Base, error)
Derive a signature base.
When using this in the client context, 'w' may be set to nil.
func (Base) BodyIsCovered ¶
BodyIsCovered is true if the base has 'content-length' and 'content-digest'.
func (Base) CanonicalString ¶
CanonicalString returns the canonical signing string based on the signature parameters.
params.CoveredComponents is used to determine the order which covered components are printed to the canonical string.
Click to show internal directories.
Click to hide internal directories.