token

package module
v0.0.0-...-412c5a8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 20, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetClaims

func GetClaims[T Validateable](rawToken string, opts TokenOptions, skipVerify bool) (claims T, err error)

Validates and returns the token claims

func New

func New[T Validateable](claims T, opts TokenOptions) (rawToken string, err error)

Generates a new token token with an optional signing key suffix.

Types

type TokenOptions

type TokenOptions struct {
	SigningKey    []byte
	EncryptionKey []byte
}

type Validateable

type Validateable interface {
	Validate() error
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL