{"action":"created","issue":{"url":"https://api.github.com/repos/lepture/flask-oauthlib/issues/225","labels_url":"https://api.github.com/repos/lepture/flask-oauthlib/issues/225/labels{/name}","comments_url":"https://api.github.com/repos/lepture/flask-oauthlib/issues/225/comments","events_url":"https://api.github.com/repos/lepture/flask-oauthlib/issues/225/events","html_url":"https://github.com/lepture/flask-oauthlib/issues/225","id":97239382,"number":225,"title":"try_oauth decorator","user":{"login":"Turbo87","id":141300,"avatar_url":"https://avatars.githubusercontent.com/u/141300?v=3","gravatar_id":"","url":"https://api.github.com/users/Turbo87","html_url":"https://github.com/Turbo87","followers_url":"https://api.github.com/users/Turbo87/followers","following_url":"https://api.github.com/users/Turbo87/following{/other_user}","gists_url":"https://api.github.com/users/Turbo87/gists{/gist_id}","starred_url":"https://api.github.com/users/Turbo87/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Turbo87/subscriptions","organizations_url":"https://api.github.com/users/Turbo87/orgs","repos_url":"https://api.github.com/users/Turbo87/repos","events_url":"https://api.github.com/users/Turbo87/events{/privacy}","received_events_url":"https://api.github.com/users/Turbo87/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-07-25T16:59:14Z","updated_at":"2015-10-03T07:07:00Z","closed_at":null,"body":"For the OAuth2 Server there is currently the [require_oauth](https://flask-oauthlib.readthedocs.org/en/latest/oauth2.html#protect-resource) decorator that checks for any OAuth2 issues and aborts the request if necessary.\r\n\r\nFor some requests however it makes sense to enhance the result if the user is authenticated. Think of a list of resources, some private, some public. An unauthenticated user should only see the public resources. An authenticated user should see both.\r\n\r\nIt would be great to have a decorator that tried the OAuth authentication, but would not fail if no credentials were provided. IMHO it should still fail if the *wrong* or expired credentials were provided."},"comment":{"url":"https://api.github.com/repos/lepture/flask-oauthlib/issues/comments/145211023","html_url":"https://github.com/lepture/flask-oauthlib/issues/225#issuecomment-145211023","issue_url":"https://api.github.com/repos/lepture/flask-oauthlib/issues/225","id":145211023,"user":{"login":"lepture","id":290496,"avatar_url":"https://avatars.githubusercontent.com/u/290496?v=3","gravatar_id":"","url":"https://api.github.com/users/lepture","html_url":"https://github.com/lepture","followers_url":"https://api.github.com/users/lepture/followers","following_url":"https://api.github.com/users/lepture/following{/other_user}","gists_url":"https://api.github.com/users/lepture/gists{/gist_id}","starred_url":"https://api.github.com/users/lepture/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lepture/subscriptions","organizations_url":"https://api.github.com/users/lepture/orgs","repos_url":"https://api.github.com/users/lepture/repos","events_url":"https://api.github.com/users/lepture/events{/privacy}","received_events_url":"https://api.github.com/users/lepture/received_events","type":"User","site_admin":false},"created_at":"2015-10-03T07:07:00Z","updated_at":"2015-10-03T07:07:00Z","body":"@Turbo87 Not ready for open source yet. The repo should be https://github.com/lepture/zerqu\r\n\r\nHere is a live site: https://python-china.org/"}}