auth

package
v0.0.0-...-e173b71 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	NoUserInContextError = commonerrors.NewAuthorizationError("no user in context", "no-user-found")
)

Functions

func HttpMockMiddleware

func HttpMockMiddleware(next http.Handler) http.Handler

HttpMockMiddleware is used in local environment

Types

type FirebaseHttpMiddleware

type FirebaseHttpMiddleware struct {
	AuthClient *auth.Client
}

func (FirebaseHttpMiddleware) Middleware

func (a FirebaseHttpMiddleware) Middleware(next http.Handler) http.Handler

type User

type User struct {
	UUID        string
	Email       string
	Role        string
	DisplayName string
}

func UserFromCtx

func UserFromCtx(ctx context.Context) (User, error)

Jump to

Keyboard shortcuts

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