mathisonian/lightning — pull request #2 by mathisonian (2014-12-08 03:38:20+00:00)
Title: Basic auth

This adds optional basic authentication to the server.

The username and password can be specified by:

* setting environmental variables `LIGHTNING_USERNAME`, `LIGHTNING_PASSWORD`
* passing command line arguments to the server `--username= --password=`
* adding these to the `config` files explicitly.

Fields have also been added to `app.json` to make these easy to initialize on heroku deployments.

Similarly b0e6560779e851a8a23d954a90e0b154d863cb38 adds support for this to the python client. The username and password can be specified upon initialization or using a setter
```
from lightning import Lightning

l = Lightning(auth=('username', 'password'))

# or

l.set_basic_auth('username', 'password')

```