auth

package
v0.0.0-...-70fadbe Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2020 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var UserCtxKey = &contextKey{"user"}

A private key for context that only this package can access. This is important to prevent collisions between different context uses

Functions

func ForContext

func ForContext(ctx context.Context) *auth.Token

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

func Middleware

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

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

Types

This section is empty.

Jump to

Keyboard shortcuts

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