gds-operations/collectd-cdn — pull request #2 by dcarley (2014-04-22 13:55:28+00:00)
Title: [#58408058] Support user/pass authentication

As an alternative to the API key, because the API key is global across a
Fastly account and doesn't support any role-based access controls.

Use requests' session management to automatically handle cookies for us. Old
cookies will be expired automatically and a new cookie will be requested if
there aren't any available.

This was previously blocked by a bug that caused a very long delay between a
cookie being issued and it being valid to use. This has now been fixed:

- https://gist.github.com/dcarley/8100039
- https://fastly.zendesk.com/requests/3047
- https://fastly.zendesk.com/requests/4736

We need to add an `api_key` to `test_response_json` because
`request()`/`auth()` now expects some authentication method.