Documentation
¶
Overview ¶
Package htpasswdauth implements the basic auth functionality using a htpasswd file.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrEmptyInput = errors.New("input is empty")
ErrEmptyInput is returned when the input is empty.
View Source
var ErrNotInitialized = errors.New("htpasswd auth not initialized")
ErrNotInitialized is returned when the htpasswd authenticator is not initialized.
Functions ¶
func WithAuthFile ¶
func WithAuthFile(fileName string) func(a *HTPassWDAuth) error
WithAuthFile configures the htpasswd file to be read from the filesystem with the given name.
func WithAuthInput ¶
func WithAuthInput(in io.Reader) func(a *HTPassWDAuth) error
WithAuthInput configures the htpasswd file to be read from the given io.Reader.
Types ¶
type HTPassWDAuth ¶
type HTPassWDAuth struct {
// contains filtered or unexported fields
}
HTPassWDAuth holds the htpasswd relevant data.
func New ¶
func New(options ...func(*HTPassWDAuth) error) (*HTPassWDAuth, error)
New creates a new htpasswd authenticator.
Click to show internal directories.
Click to hide internal directories.