jwt

package module
v0.0.0-...-3f96771 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JWTManager

type JWTManager interface {
	GenerateToken(payload interface{}) string
	AuthorizeToken(token string, p any) error
}

func NewJWTManager

func NewJWTManager(expirationDuration time.Duration, secret string, providerName string) JWTManager

type SHA256JWTManager

type SHA256JWTManager struct {
	ExpireDuration time.Duration
	// contains filtered or unexported fields
}

func (*SHA256JWTManager) AuthorizeToken

func (jm *SHA256JWTManager) AuthorizeToken(token string, p any) error

func (*SHA256JWTManager) GenerateToken

func (jm *SHA256JWTManager) GenerateToken(payload interface{}) string

Jump to

Keyboard shortcuts

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