expiringJWT

package
v0.0.0-...-1d800d4 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2024 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrExpired = &errors.UnauthorizedError{Reason: "jwt expired"}

Functions

This section is empty.

Types

type Claims

type Claims struct {
	ExpiresAt int64 `json:"exp"`
}

func (*Claims) SetExpiry

func (j *Claims) SetExpiry(expiresIn time.Duration)

func (*Claims) Validate

func (j *Claims) Validate(now time.Time) error

type ExpiringJWT

type ExpiringJWT interface {
	Validate(now time.Time) error
	SetExpiry(expiresIn time.Duration)
	FastUnmarshalJSON(p []byte) error
}

Jump to

Keyboard shortcuts

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