auth

package
v0.0.0-...-678a821 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2019 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RequireLogin = context.Handlers{
	ensureAuthSession,
	func(ctx context.Context) {
		if !IsAuthenticated(ctx) {
			next := ctx.Path()
			ctx.Redirect("/auth?next=" + next)
		} else {
			ctx.Next()
		}
	},
}

Functions

func AuthHandlers

func AuthHandlers(p iris.Party)

func GetSession

func GetSession(ctx context.Context) *sessions.Session

Returns the session for this request.

func IsAuthenticated

func IsAuthenticated(ctx context.Context) bool

func IsPasswordSet

func IsPasswordSet() (bool, error)

func IsPasswordValid

func IsPasswordValid(pw string) (bool, error)

func SetPassword

func SetPassword(pw string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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