PTGUjwt

package
v1.0.17 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2024 License: MIT Imports: 3 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Sign

func Sign(config JwtSignConfig, additionalClaim interface{}) (signToken string, err error)

func Validate

func Validate(tokenString string, config JwtValidateConfig) (claims interface{}, isExpireOrNotValidYet bool, err error)

Types

type JWTsignClaim

type JWTsignClaim struct {
	Data interface{} `json:"data"`
	jwt.RegisteredClaims
}

type JwtSignConfig

type JwtSignConfig struct {
	SignKey       string
	AppName       string
	ExpireTime    time.Time
	IssuedTime    time.Time
	NotBeforeTime time.Time
}

type JwtValidateConfig

type JwtValidateConfig struct {
	SignKey string
}

Jump to

Keyboard shortcuts

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