fzaninotto/uptime — pull request #166 by fzaninotto (2013-07-17 10:02:38+00:00)
Title: [WIP] Add basic authentication plugin

Installation
------------
This plugin is disabled by default. To enable it, add its entry
to the `plugins` key of the configuration:

// in config/production.yaml
plugins:
- ./plugins/basicAuth

Usage
-----
Restart the application, and both the API and the Dashboard applications
become protected. The monitor correctly authenticates its own calls to the API.

Default credentials are admin:password.

Configuration
-------------
Set the username and password in the configuration file, under the
basicAuth key:

// in config/production.yaml
basicAuth:
username: JohnDoe
password: S3cR3t

Implementation Notes
-----------------------------
This is made possible thanks to more plugin infrastructure refactoring:

* Allow overriding the monitor HTTP options for API requests
* Add events to the app lifecycle
* Move plugin initialization up to allow plugin routes and middlewares to override the default ones