auth

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2018 License: MIT Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Authenticator added in v1.4.0

type Authenticator interface {
	Validate(r *http.Request) bool
}

Authenticator is a generic interface to validate an HTTP request

func NewAuthenticator added in v1.4.0

func NewAuthenticator(conf *config.Config) Authenticator

NewAuthenticator creates new authenticator form the configuration

type HtpasswdFile added in v1.4.0

type HtpasswdFile struct {
	// contains filtered or unexported fields
}

HtpasswdFile is a map for usernames to passwords.

func NewHtpasswdFromFile added in v1.4.0

func NewHtpasswdFromFile(path string) (*HtpasswdFile, error)

NewHtpasswdFromFile reads the users and passwords from a htpasswd file and returns them.

func (*HtpasswdFile) Validate added in v1.4.0

func (h *HtpasswdFile) Validate(r *http.Request) bool

Validate HTTP request credentials

Jump to

Keyboard shortcuts

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