basic

package
v0.0.0-...-8b413d3 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2015 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Overview

Package basic implements basic auth mechanisms for orujo.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BasicHandler

type BasicHandler struct {

	// ErrorMsg can be used to set a custom error message. The parameter
	// provuser contains the username provided by the user.
	ErrorMsg func(w http.ResponseWriter, provuser string)
	// contains filtered or unexported fields
}

A BasicHandler is a orujo built-in handler that provides basic authentication.

func NewBasicHandler

func NewBasicHandler(realm, username, password string) BasicHandler

NewBasicHandler returns a new BasicHandler.

func (BasicHandler) ServeHTTP

func (h BasicHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP validates the username and password provided by the user.

Jump to

Keyboard shortcuts

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