JWT

package module
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2023 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Prepare added in v0.0.3

func Prepare[T any](configuration TokenGeneratorConfiguration, parameters TokenGeneratorParameters) (tokenGenerator *innerTokenGenerator[T], err error)

Types

type Claims

type Claims[T any] struct {
	jwt.RegisteredClaims
	Data T
}

type TokenGeneratorConfiguration

type TokenGeneratorConfiguration struct {
	UserValueKey string `json:"user_value_key"`
	Expires      int    `json:"expires"`
}

type TokenGeneratorParameters added in v0.0.2

type TokenGeneratorParameters struct {
	ErrorHandler func(ctx *fasthttp.RequestCtx, err error)
	Signature    []byte
}

Jump to

Keyboard shortcuts

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