jwt

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: May 13, 2022 License: MPL-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RefreshToken

func RefreshToken(strToken string, secret []byte) (string, error)

Types

type JWTClaims

type JWTClaims struct {
	jwt.StandardClaims
	UserID     string `json:"user_id"`
	IsPlatUser bool   `json:"is_plat_user"`
	IsAdmin    bool   `json:"is_admin"`
}

func VerifyToken

func VerifyToken(strToken string, secret []byte) (*JWTClaims, error)

func (*JWTClaims) MakeToken

func (claims *JWTClaims) MakeToken(TokenExpireTime int, secret []byte) (string, error)

Jump to

Keyboard shortcuts

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