jwt

package
v1.0.29 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2023 License: MIT Imports: 4 Imported by: 3

Documentation

Index

Constants

View Source
const (
	ErrorreasonServerbusy   = "服务器繁忙"
	ErrorreasonLoginOutTime = "登录过期,请重新登录"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthJwt

type AuthJwt struct {
}

func (*AuthJwt) CreateClaims

func (*AuthJwt) CreateClaims(data interface{}) (claims *Claims)

func (*AuthJwt) CreateToken

func (j *AuthJwt) CreateToken(data interface{}) (token string, err error)

func (*AuthJwt) GetToken

func (*AuthJwt) GetToken(claims *Claims) (signedToken string, err error)

func (*AuthJwt) Parse

func (*AuthJwt) Parse(strToken string) (claims *Claims, err error)

func (*AuthJwt) Refresh

func (j *AuthJwt) Refresh(token string) (newToken string, err error)

type Claims

type Claims struct {
	UserInfo interface{}
	jwt.StandardClaims
}

Jump to

Keyboard shortcuts

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