authentication

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2018 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoginHandler added in v0.1.0

func LoginHandler(authroot string, checker common.PasswordChecker, provider common.KeyProvider, insecure bool) *mux.Router

LoginHandler returns a router that handles the login and logout routes.

func NewMiddleware

func NewMiddleware(config *Options) common.Middleware

NewMiddleware returns a middlware suitable for authentication.

func NewSecureCookieChecker added in v0.1.0

func NewSecureCookieChecker(provider common.KeyProvider, users *user.Registry) common.RequestChecker

NewSecureCookieChecker verifies authentication tokens on requests according to secure cookies

Types

type Options

type Options struct {
	Realm          string
	PublicRoots    []string
	LoginPath      string
	RequestChecker common.RequestChecker
}

Options provides configuration options to the AuthenticationMiddleware.

Jump to

Keyboard shortcuts

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