Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type File ¶
type File struct { // CheckInterval is the number of seconds between checks. // If automatic reloading is enabled, this value is used as the wait time // between checks. If disabled, this value has no effect. CheckInterval int64 // contains filtered or unexported fields }
File reads htpasswd files and provides authentication
As returned by Open, a File reads in an htpasswd file searching for bcrypt hashed passwords that conform to the published formats: https://httpd.apache.org/docs/2.4/misc/password_encryptions.html CheckInterval can be customized before the first call to AutoReload to specify the wait interval between reload checks. If CheckInterval is not set, AutoReload will not be run.
func (*File) Authenticate ¶
Authenticate checks a user and password against the hashed value in the users map.
Click to show internal directories.
Click to hide internal directories.