middleware

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Auth

func Auth(a Authenticator) func(http.Handler) http.Handler

func Default

func Default(next http.Handler) http.Handler

Default sets the HTTP response headers applicable to the any route by default.

func RejectReadOnly

func RejectReadOnly(next http.Handler) http.Handler

func RevokedToken added in v0.7.0

func RevokedToken(checker auth.RevokedTokenChecker) func(http.Handler) http.Handler

RevokedToken returns HTTP middleware that rejects requests whose JWT (by JTI) or subject has been revoked according to the provided checker.

func TagParams

func TagParams(next http.Handler) http.Handler

TagParams adds any query parameters as attributes to the span

Types

type Authenticator

type Authenticator interface {
	VerifyAccessToken(token string) (*auth.Claim, error)
}

Jump to

Keyboard shortcuts

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