auth

package
v0.0.0-...-be2aeb8 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetEmail

func GetEmail(ctx context.Context) (string, error)

GetEmail returns the email address of the authenticated user that is stored in the context

Types

type Middleware

type Middleware func(next http.Handler) http.Handler

func StaticUser

func StaticUser(email string) Middleware

StaticUser returns a middleware that sets the email address of the authenticated user to the given value

func ValidateIAPJWT

func ValidateIAPJWT(aud string) Middleware

ValidateIAPJWT returns a middleware that validates the X-Goog-IAP-JWT-Assertion header and sets the email address of the authenticated user to the value of the X-Goog-Authenticated-User-Email header

Jump to

Keyboard shortcuts

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