auth

package
v0.1.59 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler interface {
	Init(cfg *config.Listener) error
	Enabled() bool
	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() *Handlers

NewHandlers --

func (*Handlers) Add

func (hh *Handlers) Add(cfg *config.Listener, ah Handler) (err error)

Add --

func (*Handlers) Check

func (hh *Handlers) Check(id uint64, prefix string, path string, 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
	Extra  interface{}
}

Identity --

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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