auth

package
v0.0.0-...-a101f2f Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2024 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BasicAuth1

func BasicAuth1(h fasthttp.RequestHandler, requiredUser, requiredPassword string) fasthttp.RequestHandler

BasicAuth is the basic auth handler

func NewBasicAuthFilter

func NewBasicAuthFilter(c *config.Config) (pipeline.Filter, error)

func NewSetBasicAuth

func NewSetBasicAuth(c *config.Config) (pipeline.Filter, error)

Types

type BasicAuth

type BasicAuth struct {
	ValidUsers map[string]string `config:"valid_users"`
}

func (*BasicAuth) Filter

func (filter *BasicAuth) Filter(ctx *fasthttp.RequestCtx)

func (*BasicAuth) Name

func (filter *BasicAuth) Name() string

type SetBasicAuth

type SetBasicAuth struct {
	Username string `config:"username"`
	Password string `config:"password"`
}

func (*SetBasicAuth) Filter

func (filter *SetBasicAuth) Filter(ctx *fasthttp.RequestCtx)

func (*SetBasicAuth) Name

func (filter *SetBasicAuth) Name() string

Jump to

Keyboard shortcuts

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