Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type JwsHeader ¶
type JwsHeader struct { Alg string `json:"alg"` // algorithm, should be "ES512". Kid string `json:"kid"` // signing key id. TlVersion string `json:"tl_version"` // signing scheme version, e.g. "2", empty implies v1 aka body-only signing. TlHeaders string `json:"tl_headers"` // comma separated ordered headers used in the signature. Jku string `json:"jku,omitempty"` // Json Web Key Url. Used in webhook signatures providing the public key jwk url. }
Tl-Signature header.
func NewJwsHeaderV2 ¶
func NewJwsHeaderV2(kid string, headers *orderedmap.OrderedMap, jku string) JwsHeader
func (*JwsHeader) FilterHeaders ¶
func (j *JwsHeader) FilterHeaders(headers map[string][]byte) (*orderedmap.OrderedMap, error)
FilterHeaders filters & orders headers to match jws header "tl_headers".
Returns an error if "headers" is missing any of the declared "tl_headers".
Click to show internal directories.
Click to hide internal directories.