gojwt

package
v1.0.9 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const TypeBearer = "Bearer"

Variables

This section is empty.

Functions

func Generate

func Generate(claims jwt.MapClaims, secret string) string

func GetPayload

func GetPayload[T any](token string, secret string) (T, error)

func GetString

func GetString(token string, key string, secret string) string

func IsExpired added in v1.0.9

func IsExpired(jwt string, key string) bool

func NewClaims

func NewClaims() jwt.MapClaims

func TokenExpired

func TokenExpired(minute int) int64

func Verify

func Verify(tokenStr string, secret string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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