jwtv2

package
v0.0.0-...-ca77a15 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2024 License: LGPL-2.1 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	JWTSecret     string
	EncryptSecret string
}

type JWTGenerator

type JWTGenerator struct {
	// contains filtered or unexported fields
}

func New

func New(config Config) *JWTGenerator

func (*JWTGenerator) DecodeJWT

func (j *JWTGenerator) DecodeJWT(tokenString string) (map[string]interface{}, error)

func (*JWTGenerator) GenerateJWT

func (j *JWTGenerator) GenerateJWT(payload map[string]interface{}, expiryDuration time.Duration) (string, error)

Jump to

Keyboard shortcuts

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