jwt

package
v0.0.38 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Signer

type Signer struct {
	Secret string
}

func NewSigner

func NewSigner(secret string) *Signer

func (*Signer) Generate

func (s *Signer) Generate(subject string, duration time.Duration) (string, error)

func (*Signer) Validate

func (s *Signer) Validate(tokenString, subject string) error

func (*Signer) ValidateAndGetClaims

func (s *Signer) ValidateAndGetClaims(tokenString string) (jwt.MapClaims, error)

ValidateAndGetClaims validates a JWT token and returns the claims

Jump to

Keyboard shortcuts

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