middleware

package
v0.0.0-...-7467996 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Adapt

func Adapt(h http.Handler, adapters ...Adapter) http.Handler

Adapt h with all specified adapters.

func Subject

func Subject(ctx context.Context) (string, bool)

Subject returns the subject value bound to the context.

Types

type Adapter

type Adapter func(http.Handler) http.Handler

Adapter defines http middleware contract. https://medium.com/@matryer/writing-middleware-in-golang-and-how-go-makes-it-so-much-fun-4375c1246e81

func BasicAuthentication

func BasicAuthentication() Adapter

BasicAuthentication is a middleware to handle basic authentication.

func ClientAuthentication

func ClientAuthentication(clients storage.ClientReader, supportedAlgorithms []jose.SignatureAlgorithm) Adapter

ClientAuthentication is a middleware to handle client authentication.

func SecurityHaders

func SecurityHaders() Adapter

SecurityHaders is a middleware to add required security headers.

Jump to

Keyboard shortcuts

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