auth

package
v0.0.0-...-fbda54b Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ForContext

func ForContext(ctx context.Context) *ent.User

ForContext finds the user from the context. REQUIRES Middleware to have run.

func Middleware

func Middleware(client *ent.Client) func(http.Handler) http.Handler

Middleware resolve current user by Authorization token

Types

type AccessDenied

type AccessDenied struct{}

AccessDenied error in the case user don't have permission

func (*AccessDenied) Error

func (m *AccessDenied) Error() string

Jump to

Keyboard shortcuts

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