jwks

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KeyFetcher

type KeyFetcher func(c context.Context, keyID string) (jwk.Key, error)

KeyFetcher allows other parts of your code to implement a simple key lookup. Pair with jwk.FromRaw or similar for returning results.

type KeyHandler

type KeyHandler struct {
	Fetcher KeyFetcher
}

KeyHandler wraps a KeyFetcher to implement jws.KeyProvider. This is used in tandem with jwt.Parse to provide dynamic key lookup.

In a more complex system, you might add logging, metrics, caching, rate limiting...

func (*KeyHandler) FetchKeys

func (h *KeyHandler) FetchKeys(c context.Context, result jws.KeySink, sig *jws.Signature, msg *jws.Message) error

Jump to

Keyboard shortcuts

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