mw-basicauth: github.com/gobuffalo/mw-basicauth Index | Files

package basicauth

import "github.com/gobuffalo/mw-basicauth"

Index

Package Files

basicauth.go version.go

Constants

const Version = "v1.0.7"

Variables

var (
    // ErrNoCreds is returned when no basic auth credentials are defined
    ErrNoCreds = errors.New("no basic auth credentials defined")

    // ErrAuthFail is returned when the client fails basic authentication
    ErrAuthFail = errors.New("invalid basic auth username or password")
)

func Middleware Uses

func Middleware(auth Authorizer) buffalo.MiddlewareFunc

Middleware enables basic authentication

type Authorizer Uses

type Authorizer func(buffalo.Context, string, string) (bool, error)

Authorizer is used to authenticate the basic auth username/password. Should return true/false and/or an error.

Package basicauth imports 5 packages (graph). Updated 2019-03-28. Refresh now. Tools for package owners.