jwtx

package
v0.0.0-...-3d0ed7e Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidToken = errors.New("token is invalid")
)

Functions

func Parse

func Parse(secretKey string, signedToken string) (jwt.MapClaims, error)

func Sign

func Sign(secretKey string, data jwt.MapClaims, options ...Option) (string, error)

Types

type Option

type Option func(*arguments)

func WithExpiration

func WithExpiration(expiration time.Duration) Option

func WithSigningMethod

func WithSigningMethod(method jwt.SigningMethod) Option

Jump to

Keyboard shortcuts

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