auth

package
v0.0.0-...-4e6cce8 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExistsInContext

func ExistsInContext(ctx context.Context) bool

func FromContext

func FromContext(ctx context.Context) *models.User

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

func FromContextWithCheck

func FromContextWithCheck(ctx context.Context) (*models.User, bool)

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

func Middleware

func Middleware(db *sql.DB) func(http.Handler) http.Handler

Middleware decodes the share session cookie and packs the session into context

func UserIDFromContext

func UserIDFromContext(ctx context.Context) uint

Types

This section is empty.

Jump to

Keyboard shortcuts

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