basicauth

package module
v0.0.0-...-dba2c48 Latest Latest
Warning

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

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

README

Basic Auth

License

Installation

go get github.com/gowool/middleware/basicauth

License

Distributed under MIT License, please see license file within the code for more details.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Middleware

func Middleware(cfg *Config) wool.Middleware

Types

type BasicAuth

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

func New

func New(cfg *Config) *BasicAuth

func (*BasicAuth) Middleware

func (m *BasicAuth) Middleware(next wool.Handler) wool.Handler

type Config

type Config struct {
	Realm     string `mapstructure:"realm"`
	Validator Validator
}

func (*Config) Init

func (cfg *Config) Init()

type Validator

type Validator func(c wool.Ctx, user, password string) (bool, error)

Jump to

Keyboard shortcuts

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