octokit/octokit.rb — pull request #467 by pengwynn (2014-04-15 17:56:18+00:00)
Title: Application-authenticated methods for tokens

This PR adds support for a few new(ish) API methods that require Basic Authentication using an OAuth app client_id and secret

- [Check an authorization][]
- [Reset an authorization][]
- [Revoke an authorization][]
- [Revoke all authorizations][]

It also introduces a helper to use OAuth-creds-over-basic with an existing client:

```ruby
Octokit.client_id = "foo"
Ocotkit.client_secret = "bar"

# GET https://api.github.com/?client_id=foo&client_secret=bar
Octokit.get "/"

Octokit.client.as_app do |client|
# GET https://foo:bar@api.github.com/
client.get "/"
end
```

[Check an authorization]: https://developer.github.com/v3/oauth_authorizations/#check-an-authorization
[Reset an authorization]: https://developer.github.com/v3/oauth_authorizations/#reset-an-authorization
[Revoke an authorization]: https://developer.github.com/v3/oauth_authorizations/#revoke-an-authorization-for-an-application
[Revoke all authorizations]: https://developer.github.com/v3/oauth_authorizations/#revoke-all-authorizations-for-an-application

---
/cc @joeyw and maybe @bhuga