account

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateJwtRefreshToken

func GenerateJwtRefreshToken(secret string, duration time.Duration) (string, error)

生成 jwt refresh token

func GenerateJwtToken

func GenerateJwtToken(secret string, duration time.Duration, memberId string, channel int64, accountPlat string, phonePlat int32, deviceID string) (string, error)

生成 jwt token

Types

type Claims

type Claims struct {
	jwt.StandardClaims
	MemberId    string `json:"member_id"`
	AccountPlat string `json:"account_plat"`
	PhonePlat   int32  `json:"phone_plat"`
	DeviceId    string `json:"device_id"`
	Channel     int64  `json:"channel"`
}

func ParseJwtToken

func ParseJwtToken(token string, secret string) (*Claims, error)

解析 jwt token

Jump to

Keyboard shortcuts

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