Documentation
¶
Overview ¶
Index ¶
- Variables
- func V1Decrypt(token string, key []byte, payload, footer any) error
- func V1Encrypt(key []byte, payload, footer any, randBytes []byte) (string, error)
- type Token
- 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
Examples ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
Types ¶
type Token ¶
type Token struct {
// contains filtered or unexported fields
}
func (*Token) ClaimsPart ¶
ClaimsPart returns token claims part.
func (*Token) DecodeClaims ¶
DecodeClaims into a given parameter.
func (*Token) DecodeFooter ¶
DecodeFooter into a given parameter.
func (*Token) HeaderPart ¶
HeaderPart returns token header part.
func (*Token) PayloadPart ¶
PayloadPart returns token payload part.
func (*Token) SignaturePart ¶
SignaturePart returns token signature part.
Click to show internal directories.
Click to hide internal directories.