auth

package
v0.0.0-...-67a1156 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Middleware

func Middleware(db *proxima.ProximaDatabase) func(http.Handler) http.Handler

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

Types

type User

type User struct {
	ID      string
	Name    string
	IsAdmin bool
}

A stand-in for our database backed user object

func ForContext

func ForContext(ctx context.Context) *User

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

Jump to

Keyboard shortcuts

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