jwt

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2024 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(conf *config.JWT)

Types

type Jwt

type Jwt interface {
	NewToken(m map[string]any) (string, error)
	Parse(ctx context.Context, dst any) error
	ParseMapClaims(ctx context.Context) (map[string]any, error)
	IsWhitelist(path string) bool
	IsBlacklist(token string) bool
	AddBlacklist(token string)
	GetToken(ctx context.Context) string
	SetToken(ctx context.Context, token string) context.Context
	Renewal(ctx context.Context) (string, error)
}

func Instance

func Instance() Jwt

Instance 获取email对象实例

Jump to

Keyboard shortcuts

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