simple

package
v0.0.0-...-6064aa9 Latest Latest
Warning

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

Go to latest
Published: May 18, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const BackendName = "simple"

BackendName name

Variables

This section is empty.

Functions

This section is empty.

Types

type Simple

type Simple struct {
	UseBcrypt   bool              `json:"use_bcrypt,omitempty"`
	Credentials map[string]string `json:"credentials,omitempty"`
}

Simple is the simplest backend for authentication, a name:password map

func NewDriver

func NewDriver() *Simple

NewDriver returns a new instance of Simple with some defaults

func (Simple) Authenticate

func (h Simple) Authenticate(r *http.Request) (string, error)

Authenticate fulfils the backend interface

func (Simple) Validate

func (h Simple) Validate() error

Validate verifies that this module is functional with the given configuration

Jump to

Keyboard shortcuts

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