jwt

package
v0.0.0-...-2d60b20 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JwtConfig

type JwtConfig struct {
	// KeyAlgorithm is the key algorithm we are expecting
	KeyAlgorithm jwa.KeyAlgorithm `yaml:"KeyAlgorithm,omitempty"`
	// KeyPath is the path to the key file(s) (if using JWS)
	KeyPath string `yaml:"keyPath,omitempty"`
	// Issuer is the authority that issued the JWT
	Issuer string `yaml:"issuer,omitempty"`
	// Audience is the expected audience (i.e. "Fact-Totem")
	Audience string `yaml:"audience,omitempty"`
	// AcceptableSkew is the amount of time difference acceptable when testing times
	AcceptableSkew time.Duration `yaml:"acceptableSkew,omitempty"`
	// Maximum duration between the jwt issue time and expiration time, implicitly requires both values
	MaxValidWindow time.Duration `yaml:"maxValidWindow,omitempty"`
	// contains filtered or unexported fields
}

func (*JwtConfig) ValidToken

func (c *JwtConfig) ValidToken(token string) (jwt.Token, error)

Jump to

Keyboard shortcuts

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