jwtg

package
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JwtGenerator

type JwtGenerator[T any] struct {
	ExpMinute int
	// contains filtered or unexported fields
}

func NewJwtGenrator

func NewJwtGenrator[T any](key []byte, container T) (jg *JwtGenerator[T], err error)

生成Jwt生成器

func (*JwtGenerator[T]) NewToken

func (g *JwtGenerator[T]) NewToken(u T) (token []byte, err error)

type JwtToken

type JwtToken[T any] struct {
	jwt.Payload
	Tag T `json:"t,omitempty"`
}

Jump to

Keyboard shortcuts

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