auth

package
v0.0.0-...-d78814b Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2019 License: GPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CurrentUser

func CurrentUser(r *http.Request) (*users.User, error)

CurrentUser returns the current user's object.

func LoggedIn

func LoggedIn(r *http.Request) bool

LoggedIn returns whether the current user is logged in to an account.

func Login

func Login(w http.ResponseWriter, r *http.Request, u *users.User) error

Login logs the browser in as the given user.

func LoginRequired

func LoginRequired(onError http.HandlerFunc) negroni.HandlerFunc

LoginRequired is a middleware that requires a logged-in user.

func Middleware

func Middleware(w http.ResponseWriter, r *http.Request, next http.HandlerFunc)

Middleware loads the user's authentication state from their session cookie.

Types

This section is empty.

Jump to

Keyboard shortcuts

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