Versions in this module Expand all Collapse all v0 v0.1.0 Apr 12, 2024 Changes in this version + var ErrDataUnmarshal = errors.New("can't unmarshal token data to the given type of value") + var ErrIncorrectTokenFormat = errors.New("incorrect token format") + var ErrIncorrectTokenHeader = errors.New("incorrect token header") + var ErrInvalidTokenAuth = errors.New("invalid token authentication") + func V1Decrypt(token string, key []byte, payload, footer any) error + func V1Encrypt(key []byte, payload, footer any, randBytes []byte) (string, error) + type Token struct + func (t *Token) Bytes() []byte + func (t *Token) Claims() json.RawMessage + func (t *Token) ClaimsPart() []byte + func (t *Token) DecodeClaims(dst any) error + func (t *Token) DecodeFooter(dst any) error + func (t *Token) Footer() json.RawMessage + func (t *Token) HeaderPart() []byte + func (t *Token) PayloadPart() []byte + func (t *Token) SignaturePart() []byte + func (t *Token) String() string + func (t Token) Type() TokenType + type TokenType uint + const TokenUnknown + const TokenV1Local + const TokenV1Public + const TokenV2Local + const TokenV2Public + const TokenV3Local + const TokenV3Public + const TokenV4Local + const TokenV4Public