whauth

package
v1.0.0-...-3f30213 Latest Latest
Warning

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

Go to latest
Published: May 30, 2017 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package whauth provides some helper methods and handlers for dealing with HTTP basic auth

Index

Constants

This section is empty.

Variables

View Source
var (
	BasicAuthUser = webhelp.GenSym()
)

Functions

func RequireBasicAuth

func RequireBasicAuth(h http.Handler, realm string,
	valid func(ctx context.Context, user, pass string) bool) http.Handler

RequireBasicAuth ensures that a valid user is provided, calling wherr.Handle with wherr.Unauthorized if not.

Types

This section is empty.

Jump to

Keyboard shortcuts

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