Documentation ¶
Index ¶
- func DecodeAuthHeader(header string) (id string, nonce uuid.UUID, mac []byte, err error)
- func EncodeAuthHeader(id string, nonce uuid.UUID, mac []byte) (string, error)
- func New512(tenantID string, payload []byte, key ed25519.PrivateKey) (uuid.UUID, []byte, error)
- func Verify(mac []byte, tenantID string, nonce uuid.UUID, payload []byte, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeAuthHeader ¶
Decodes the value of the "Authorization" header into its constituent parts. It returns an ID (the tenant ID), a nonce (a v4 UUID), and an unencoded MAC.
func EncodeAuthHeader ¶
Generates the value of the "Authorization" header for a MAC with the given id, nonce, and mac. The id is an arbitrary string and should correspond to the tenant ID. The nonce should be a v4 UUID. The mac should not have any encoding.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.