jwt

package
v1.9.4 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseToken

func ParseToken(tokenString string, secret string, dest JwtStoreValue) error

Types

type Claims

type Claims struct {
	jwt2.RegisteredClaims
	Value map[string]any `json:"value"`
}

type JwtStoreValue

type JwtStoreValue interface {
	ToMap() map[string]any
	FromMap(m map[string]any) error
}

type TokenResponse

type TokenResponse struct {
	Token     string
	ExpiresAt time.Time
}

func GenerateToken

func GenerateToken(secret string, tokenTTL time.Duration, value JwtStoreValue) (*TokenResponse, error)

Jump to

Keyboard shortcuts

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