Documentation
¶
Overview ¶
Package linktoken signs the tokens embedded in emails: open pixel, click redirect, one-click unsubscribe (RFC 8058), preference center, view online and double opt-in confirmation links. Tokens are compact, unforgeable (HMAC-SHA256 truncated to 128 bits) and carry no personal data in clear.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalid = errors.New("linktoken: invalid token")
ErrInvalid is returned for malformed or forged tokens.
Functions ¶
This section is empty.
Types ¶
type Claims ¶
type Claims struct {
Kind Kind
WorkspaceID uuid.UUID
MessageID uuid.UUID // uuid.Nil when not tied to a message
ContactID uuid.UUID
// Link is the index of the link in campaign_links for Click tokens.
Link uint32
}
Claims identify the message (or contact, for links outside a message).
type Kind ¶
type Kind byte
Kind is what a token is for; a token for one purpose never works for another.
Click to show internal directories.
Click to hide internal directories.