middleware

package
v0.0.0-...-8474782 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const CurrentUserKey key = "currentUser"

CurrentUserKey for middleware

Variables

This section is empty.

Functions

func AuthMiddleware

func AuthMiddleware(repo mongodb.UserRepo) func(http.Handler) http.Handler

AuthMiddleware to authenticate graphql users

func GetCurrentUserFromCTX

func GetCurrentUserFromCTX(ctx context.Context) (*models.User, error)

GetCurrentUserFromCTX from context

Types

This section is empty.

Jump to

Keyboard shortcuts

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