middleware

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Jwt

func Jwt(
	logger *log.Logger,
	controller controller.Controller,
) func(http.Handler) http.Handler

Jwt handles user authorization via JSON Web Tokens.

func JwtForContext

func JwtForContext(ctx context.Context) (*ent.User, error)

JwtForContext finds user from context. Requires Jwt to have run.

func Logging

func Logging(next http.Handler) http.Handler

Logging returns a handlers.CombinedLoggingHandler with the 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