basicauth

package
v0.0.0-...-176b943 Latest Latest
Warning

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

Go to latest
Published: May 2, 2016 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrBasicAuthFailed = goa.NewErrorClass("basic_auth_failed", 401)

ErrBasicAuthFailed means it wasn't able to authenticate you with your login/password.

Functions

func New

func New(username, password string) goa.BasicAuthSecurityConfigFunc

New creates a static username/password handler for your `goa.BasicAuthSecurity` method.

Example:

app.MyBasicAuthSecurity.Use(basicauth.New("admin", "password"))

It doesn't get simpler than that.

If you want to handle the username and password checks dynamically, copy the source of `New`, it's 8 lines and you can tweak at will.

Types

This section is empty.

Jump to

Keyboard shortcuts

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