jwt

package
v2.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Claims

type Claims struct {
	ID   int32  `json:"id"`
	Type string `json:"type"`
	jwt.RegisteredClaims
}

type Jwt

type Jwt struct {
	Config *JwtConfig
}

func NewJwt

func NewJwt(cfg *JwtConfig) *Jwt

func (*Jwt) Get

func (j *Jwt) Get(t string, claims *Claims) error

func (*Jwt) Set

func (j *Jwt) Set(id int32, types string) (string, error)

type JwtConfig

type JwtConfig struct {
	Expir  int64 // jwt登录过期时间,分钟,1440一天
	Issuer string
	Sign   string
}

Jump to

Keyboard shortcuts

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