# Functions
AllowUsers is an AuthFunc which authenticates user input based on a (static) user list.
AllowUsersFile is an AuthFunc which authenticates user input based on a (static) user list loaded from a file on initialization.
BCRYPT it is a UserAuthOption, it compares a bcrypt hashed password with its user input.
Default returns a new basic authentication middleware based on pre-defined user list.
DefaultErrorHandler is the default error handler for the Options.ErrorHandler field.
Load same as Default but instead of a hard-coded user list it accepts a filename to load the users from.
New returns a new basic authentication middleware.
# Constants
DefaultCookieMaxAge is the default cookie max age on MaxTries, when the Options.MaxAge is zero.
DefaultMaxTriesCookie is the default cookie name to store the current amount of login failures when MaxTries > 0.
DefaultRealm is the default realm directive value on Default and Load functions.
# Variables
ReadFile can be used to customize the way the AllowUsersFile function is loading the filename from.
# Structs
BasicAuth implements the basic access authentication.
GC holds the context and the tick duration to clear expired stored credentials.
Options holds the necessary information that the BasicAuth instance needs to perform.
UserAuthOptions holds optional user authentication options that can be given to the builtin Default and Load (and AllowUsers, AllowUsersFile) functions.
# Interfaces
User is a partial part of the iris.User interface.
# Type aliases
AuthFunc accepts the current request and the username and password user inputs and it should optionally return a user value and report whether the login succeed or not.
ErrorHandler should handle the given request credentials failure.
UserAuthOption is the option function type for the Default and Load (and AllowUsers, AllowUsersFile) functions.