alphagov/gds-api-adapters — pull request #9 by jystewart (2012-09-07 12:32:39+00:00)
Title: Oauth api authentication

Add an option to use bearer tokens for authenticating API requests

I also removed the unused GdsApi::Oauth2Client and broke a few methods up for simplicity/clarity (more is needed there at some point).

In order to use these changes apps need to change their PANOPTICON_API_CREDENTIALS constant from providing HTTP Basic credentials to providing the bearer token, eg.

```PANOPTICON_API_CREDENTIALS = { bearer_token: 'MY_BEARER_TOKEN' }```