Properties:
Name | Type | Description |
---|---|---|
mode |
string | [default: |
realm |
string | [default: |
users |
object | [default: |
Extends
Methods
-
Authorizes the given HTTP request and returns a user name, or
null
if the request is not authorized.Name Type Description request
HTTPRequest The request to authorize.
Returns:
Type Description string The user name, or null
. -
Creates a password hash for the given user, realm, and password for use in the
users
table.Name Type Description user
string The user name.
realm
string The name of the authentication realm.
password
string The password.
Returns:
Type Description string The password hash. -
Adds an authorization request to the given HTTP response.
Name Type Description response
HTTPResponse The response object.