airlock

package module
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: May 21, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrMissingKid    = errors.New("missing key id")
	ErrNoMatchingKey = errors.New("no matching key for token key id")
)

Functions

func PublicKeysFromJWKS

func PublicKeysFromJWKS(jwksURI string) (map[string]any, error)

Types

type Authenticator

type Authenticator interface {
	Authenicated() func(handler http.Handler) http.Handler
	UserID(r *http.Request) string
}

func NewJsonWebTokenAuthenticator

func NewJsonWebTokenAuthenticator(jwksURI string, errorFunc func(http.ResponseWriter, *http.Request, string, int)) (Authenticator, error)

Jump to

Keyboard shortcuts

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