common

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ACCESS_TOKEN     = "access_token"
	ACCESS_TOKEN_TTL = 60 * 30 // sec

	REFRESH_TOKEN     = "refresh_token"
	REFRESH_TOKEN_TTL = 60 * 60 * 24 //sec

	CURRENT_USER_ID = "curUserID"

	ERR_EMPTY_USER  = "the current user id is empty"
	ERR_EMPTY_PARAM = "the param is empty"
)

Variables

This section is empty.

Functions

func VerifyToken

func VerifyToken(tokenString string, claims jwt.Claims, secretKey string) bool

VerifyToken parses the signatured token with given secret key and validates the parsed token(claims).

Types

This section is empty.

Jump to

Keyboard shortcuts

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