webhelp.v1: gopkg.in/webhelp.v1/whauth Index | Files

package whauth

import "gopkg.in/webhelp.v1/whauth"

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


Package Files



var (
    BasicAuthUser = webhelp.GenSym()

func RequireBasicAuth Uses

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.

Package whauth imports 6 packages (graph). Updated 2017-06-05. Refresh now. Tools for package owners.