token_verify

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateChatToken

func CreateChatToken(userId string, ttlDay int64, accessSecret string) (string, error)

func CreateToken

func CreateToken(UserID string, ttlDay int64, accessSecret string) (string, error)

func GetChatToken

func GetChatToken(token string, accessSecret string) (string, error)

func GetUserIDFromToken

func GetUserIDFromToken(tokensString string, accessSecret string) (string, error)

Types

type Claims

type Claims struct {
	UserID string
	jwt.RegisteredClaims
}

func BuildClaims

func BuildClaims(userID string, ttlDay int64) Claims

Jump to

Keyboard shortcuts

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