middleware

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const ErrorAccessDenied = "access_denied"

Variables

View Source
var (
	ErrMissingKid          = errors.New("missing key id")
	ErrMatchingKeyNotFound = errors.New("matching key not found")
)

Functions

func RequireAuthN added in v0.8.0

func RequireAuthN(next http.Handler, tokenVerifier AccessTokenValidator, peopleStore people.Store, audiences ...string) http.Handler

func RequireJWT

func RequireJWT(next http.Handler, tokenVerifier AccessTokenValidator, audiences ...string) http.Handler

func RequireSelfOrRole added in v0.8.0

func RequireSelfOrRole(next http.Handler, peopleStore people.Store, roleMappings oauth2.RoleMappings, allowedRole string) http.Handler

Types

type AccessTokenValidator

type AccessTokenValidator interface {
	Validate(rawToken string, audiences ...string) (string, error)
}

func NewAccessTokenValidator

func NewAccessTokenValidator(keySetProvider keyset.Provider) AccessTokenValidator

Jump to

Keyboard shortcuts

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