tokenverify

package
v1.8.3 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2024 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TokenUser  = constant.NormalUser
	TokenAdmin = constant.AdminUser
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Token

type Token struct {
	Expires time.Duration
	Secret  string
}

func (*Token) CreateToken

func (t *Token) CreateToken(UserID string, userType int32) (string, time.Duration, error)

func (*Token) GetExpire added in v1.8.3

func (t *Token) GetExpire(token string) time.Time

func (*Token) GetToken

func (t *Token) GetToken(token string) (string, int32, error)

Jump to

Keyboard shortcuts

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