gmjwt

package
v0.100.18 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2024 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JwtClaims

type JwtClaims struct {
	Seed      interface{} `json:"seed"`
	Timestamp int64       `json:"timestamp"`
	jwt.StandardClaims
}

func (*JwtClaims) ParseJwtTokenSeed

func (c *JwtClaims) ParseJwtTokenSeed(v any) error

type JwtClient

type JwtClient struct {
	SignedKey  string
	Expiration int64
}

func InitJwtClient

func InitJwtClient(signedKey string, expiration int64) (client *JwtClient)

func (*JwtClient) NewJwtClaims

func (c *JwtClient) NewJwtClaims(seed interface{}) *JwtClaims

func (*JwtClient) NewJwtToken

func (c *JwtClient) NewJwtToken(seed interface{}) (string, error)

func (*JwtClient) ParseJwtToken

func (c *JwtClient) ParseJwtToken(token string) (*JwtClaims, error)

Jump to

Keyboard shortcuts

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