claims

package
v0.3.11 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2025 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateClaims

func GenerateClaims(
	issuedAt time.Time,
	expirationAt time.Time,
	additionalClaims map[string]interface{},
) *jwt.MapClaims

GenerateClaims generates a new claims object

func GetExpirationTime

func GetExpirationTime(
	issuedTime time.Time,
	duration time.Duration,
) time.Time

GetExpirationTime returns the expiration time for the given duration

Types

type Validator

type Validator interface {
	ValidateClaims(
		claims *jwt.MapClaims,
		interception gojwtinterception.Interception,
	) (bool, error)
}

Validator interface

Jump to

Keyboard shortcuts

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