middleware

package
v0.0.0-...-8bea463 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApiKeyAuthentication

func ApiKeyAuthentication() func(next http.Handler) http.Handler

ApiKeyAuthentication If the request has an authorization header, we will try to pull the service account who owns it from the database and put the account into the context.

func InsecureUserHeader

func InsecureUserHeader() func(next http.Handler) http.Handler

InsecureUserHeader returns a middleware that sets the email address of the authenticated user from the x-user-email header. This middleware is intended for local development and testing purposes only.

func Oauth2Authentication

func Oauth2Authentication(authHandler authn.Handler) func(next http.Handler) http.Handler

Oauth2Authentication If the request has a session cookie, look up the session from the store, and if it exists, try to load the user with the email address stored in the session.

func RequireAuthenticatedUser

func RequireAuthenticatedUser() func(next http.Handler) http.Handler

Types

This section is empty.

Jump to

Keyboard shortcuts

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