jwt

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateToken

func GenerateToken(guard string, secret string, ops *Options) string

GenerateToken 生成 JWT 令牌

func NewNumericDate

func NewNumericDate(t time.Time) *jwt.NumericDate

Types

type AuthClaims

type AuthClaims struct {
	Guard string `json:"guard"` // 授权守卫
	jwt.RegisteredClaims
}

func ParseToken

func ParseToken(token string, secret string) (*AuthClaims, error)

ParseToken 解析 JWT Token

type Options

type Options jwt.RegisteredClaims

Jump to

Keyboard shortcuts

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