httputils

package
v0.0.0-...-cd5470e Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidBasicCredentials = errors.New(
	http.StatusUnauthorized,
	"Invalid Basic credentials",
)

ErrInvalidBasicCredentials is error when user pass invalid username or password

Functions

func BuildBasicAuth

func BuildBasicAuth(
	expectedUsername string,
	expectedPassword string,
	logger *logrus.Logger,
) func(username, password string) (interface{}, error)

BuildBasicAuth build basicAuth checker

func BuildServerErrorHandler

func BuildServerErrorHandler(
	redirectHandler http.Handler,
	logger *logrus.Logger,
) func(http.ResponseWriter, *http.Request, error)

BuildServerErrorHandler build error handler

Types

This section is empty.

Jump to

Keyboard shortcuts

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