{"action":"created","issue":{"url":"https://api.github.com/repos/instedd/cdx/issues/449","labels_url":"https://api.github.com/repos/instedd/cdx/issues/449/labels{/name}","comments_url":"https://api.github.com/repos/instedd/cdx/issues/449/comments","events_url":"https://api.github.com/repos/instedd/cdx/issues/449/events","html_url":"https://github.com/instedd/cdx/pull/449","id":113868300,"number":449,"title":"Fixed #339: support OAuth","user":{"login":"asterite","id":209371,"avatar_url":"https://avatars.githubusercontent.com/u/209371?v=3","gravatar_id":"","url":"https://api.github.com/users/asterite","html_url":"https://github.com/asterite","followers_url":"https://api.github.com/users/asterite/followers","following_url":"https://api.github.com/users/asterite/following{/other_user}","gists_url":"https://api.github.com/users/asterite/gists{/gist_id}","starred_url":"https://api.github.com/users/asterite/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asterite/subscriptions","organizations_url":"https://api.github.com/users/asterite/orgs","repos_url":"https://api.github.com/users/asterite/repos","events_url":"https://api.github.com/users/asterite/events{/privacy}","received_events_url":"https://api.github.com/users/asterite/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/instedd/cdx/labels/development","name":"development","color":"ededed"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-10-28T16:59:21Z","updated_at":"2015-10-28T16:59:53Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/instedd/cdx/pulls/449","html_url":"https://github.com/instedd/cdx/pull/449","diff_url":"https://github.com/instedd/cdx/pull/449.diff","patch_url":"https://github.com/instedd/cdx/pull/449.patch"},"body":"* Added [doorkeeper gem](https://github.com/doorkeeper-gem/doorkeeper#other-customizations) which adds support for OAuth2. Very little is used for this, mainly the apps and access tokens generation logic, and the authentication logic.\r\n* In ApiController use `current_user` if available (which also supports basic auth) and if not tries to use the OAuth token (which can be provided in a header or query string and is handled by doorkeeper)\r\n* Added an \"API tokens\" menu option in the right UI navbar which lets you manage your API tokens. For now you can click \"+\" and it creates a token that never expires. From that same list you can delete that token. In the future we might want to add an expiration date and maybe add a name to each token, or other options.\r\n* Removed the \"Request API token\" link and related logic"},"comment":{"url":"https://api.github.com/repos/instedd/cdx/issues/comments/151909710","html_url":"https://github.com/instedd/cdx/pull/449#issuecomment-151909710","issue_url":"https://api.github.com/repos/instedd/cdx/issues/449","id":151909710,"user":{"login":"asterite","id":209371,"avatar_url":"https://avatars.githubusercontent.com/u/209371?v=3","gravatar_id":"","url":"https://api.github.com/users/asterite","html_url":"https://github.com/asterite","followers_url":"https://api.github.com/users/asterite/followers","following_url":"https://api.github.com/users/asterite/following{/other_user}","gists_url":"https://api.github.com/users/asterite/gists{/gist_id}","starred_url":"https://api.github.com/users/asterite/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asterite/subscriptions","organizations_url":"https://api.github.com/users/asterite/orgs","repos_url":"https://api.github.com/users/asterite/repos","events_url":"https://api.github.com/users/asterite/events{/privacy}","received_events_url":"https://api.github.com/users/asterite/received_events","type":"User","site_admin":false},"created_at":"2015-10-28T16:59:52Z","updated_at":"2015-10-28T16:59:52Z","body":"Once this is merged I'll change hub to support oauth authentication for cdx subscribers."}}