{"action":"created","issue":{"url":"https://api.github.com/repos/antek-drzewiecki/wine_bouncer/issues/32","labels_url":"https://api.github.com/repos/antek-drzewiecki/wine_bouncer/issues/32/labels{/name}","comments_url":"https://api.github.com/repos/antek-drzewiecki/wine_bouncer/issues/32/comments","events_url":"https://api.github.com/repos/antek-drzewiecki/wine_bouncer/issues/32/events","html_url":"https://github.com/antek-drzewiecki/wine_bouncer/issues/32","id":59955389,"number":32,"title":"thoughts about auth strategies","user":{"login":"calfzhou","id":3761553,"avatar_url":"https://avatars.githubusercontent.com/u/3761553?v=3","gravatar_id":"","url":"https://api.github.com/users/calfzhou","html_url":"https://github.com/calfzhou","followers_url":"https://api.github.com/users/calfzhou/followers","following_url":"https://api.github.com/users/calfzhou/following{/other_user}","gists_url":"https://api.github.com/users/calfzhou/gists{/gist_id}","starred_url":"https://api.github.com/users/calfzhou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/calfzhou/subscriptions","organizations_url":"https://api.github.com/users/calfzhou/orgs","repos_url":"https://api.github.com/users/calfzhou/repos","events_url":"https://api.github.com/users/calfzhou/events{/privacy}","received_events_url":"https://api.github.com/users/calfzhou/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-03-05T14:03:27Z","updated_at":"2015-03-05T16:10:10Z","closed_at":null,"body":"Current strategies (default, protected, and swagger) are not very handy to use. I guess that `swagger` could be an additional configuration, injecting swagger specific syntax. And for the `protected`, maybe there could be a class method such as `oauth_all` (see the `guard!` and `guard_all!` in this [demo app](https://github.com/chitsaou/oauth2-api-sample/blob/master/app%2Fapi%2Fconcerns%2Fapi_guard.rb)) which could protect the entire class.\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/antek-drzewiecki/wine_bouncer/issues/comments/77392524","html_url":"https://github.com/antek-drzewiecki/wine_bouncer/issues/32#issuecomment-77392524","issue_url":"https://api.github.com/repos/antek-drzewiecki/wine_bouncer/issues/32","id":77392524,"user":{"login":"antek-drzewiecki","id":1072248,"avatar_url":"https://avatars.githubusercontent.com/u/1072248?v=3","gravatar_id":"","url":"https://api.github.com/users/antek-drzewiecki","html_url":"https://github.com/antek-drzewiecki","followers_url":"https://api.github.com/users/antek-drzewiecki/followers","following_url":"https://api.github.com/users/antek-drzewiecki/following{/other_user}","gists_url":"https://api.github.com/users/antek-drzewiecki/gists{/gist_id}","starred_url":"https://api.github.com/users/antek-drzewiecki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/antek-drzewiecki/subscriptions","organizations_url":"https://api.github.com/users/antek-drzewiecki/orgs","repos_url":"https://api.github.com/users/antek-drzewiecki/repos","events_url":"https://api.github.com/users/antek-drzewiecki/events{/privacy}","received_events_url":"https://api.github.com/users/antek-drzewiecki/received_events","type":"User","site_admin":false},"created_at":"2015-03-05T16:10:10Z","updated_at":"2015-03-05T16:10:10Z","body":"Good thinking. This would be a great improvement. This is actually what the protected strategy is doing. \r\nThe reason why strategies were introduced is because it was quite difficult to protect an entire class and inject swagger syntax on class loading. I'll be happy to accept PR's that lead into simplifying protection of the API."}}