auth

package
v0.1.86 Latest Latest
Warning

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

Go to latest
Published: May 6, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Log --
	Log = log.NewFacility("stdhttp.auth")
)

Functions

func Hash added in v0.1.72

func Hash(p []byte, salt []byte) []byte

Hash --

Types

type Handler

type Handler interface {
	Init(cfg *config.Listener) error
	Enabled() bool
	Score() int
	WWWAuthHeader() (name string, withRealm bool)
	Check(id uint64, prefix string, path string, w http.ResponseWriter, r *http.Request) (identity *Identity, tryNext bool)
}

Handler --

type Handlers

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

Handlers --

func NewHandlers

func NewHandlers(cfg *config.Listener) *Handlers

NewHandlers --

func (*Handlers) Add

func (hh *Handlers) Add(ah Handler) (err error)

Add --

func (*Handlers) Check

func (hh *Handlers) Check(id uint64, prefix string, path string, permissions misc.BoolMap, w http.ResponseWriter, r *http.Request) (identity *Identity, code int, msg string)

Check --

func (*Handlers) Enabled

func (hh *Handlers) Enabled() bool

Enabled --

func (*Handlers) WriteAuthRequestHeaders

func (hh *Handlers) WriteAuthRequestHeaders(w http.ResponseWriter, prefix string, path string)

WriteAuthRequestHeaders --

type Identity

type Identity struct {
	Method string
	User   string
	Groups []string
	Extra  interface{}
}

Identity --

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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