Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type HMAC ¶
type HMAC struct { // Hashes is a map of algorithms to a slice of hash.Hash. The slice is used to support multiple secrets. Hashes map[Algorithm][]hash.Hash // NoPrefix doesn't prefix the algorithm to the signature. The default is for the prefix to be added. Example: sha256=abc123 NoPrefix bool }
HMAC is the HMAC configuration for signing data.
type Signature ¶
type Signature struct { // BaseHeader is the header name that should contain the signature(s). Example: X-Rufio-Signature BaseHeader string // DisableAlgoHeader decides whether to append the algorithm to the signature header or not. Default is to append. // Example: X-Rufio-Signature becomes X-Rufio-Signature-256 // When set to false, a header will be added for each algorithm. Example: X-Rufio-Signature-256 and X-Rufio-Signature-512 DisableAlgoHeader bool // PayloadHeaders are headers whose values will be included in the signature payload. Example: X-Rufio-Timestamp PayloadHeaders []string // HMAC is the HMAC to use for signing HMAC HMAC }
Signature contains the configuration for signing HTTP requests.
Click to show internal directories.
Click to hide internal directories.