basicauth

package
v0.0.0-...-6907ca9 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2018 License: MIT Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseAuthHeader

func ParseAuthHeader(auths []string, typeWanted, realmWanted string) (string, string, error)

ParseAuthHeader returns a username and password from a list of Auth header Supported type are "basic" and "password". Example

basic user:password
password base64EncodedPassword

TODO(melvin): support multiple realm

func SetWWWAuthenticate

func SetWWWAuthenticate(res http.ResponseWriter, typ, realm string)

SetWWWAuthenticate set an auth error to the response

Types

This section is empty.

Jump to

Keyboard shortcuts

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