{"action":"created","issue":{"url":"https://api.github.com/repos/lucadegasperi/oauth2-server-laravel/issues/580","labels_url":"https://api.github.com/repos/lucadegasperi/oauth2-server-laravel/issues/580/labels{/name}","comments_url":"https://api.github.com/repos/lucadegasperi/oauth2-server-laravel/issues/580/comments","events_url":"https://api.github.com/repos/lucadegasperi/oauth2-server-laravel/issues/580/events","html_url":"https://github.com/lucadegasperi/oauth2-server-laravel/issues/580","id":113056982,"number":580,"title":"Calling various 'get' methods without active session throws exception","user":{"login":"tpavlek","id":782576,"avatar_url":"https://avatars.githubusercontent.com/u/782576?v=3","gravatar_id":"","url":"https://api.github.com/users/tpavlek","html_url":"https://github.com/tpavlek","followers_url":"https://api.github.com/users/tpavlek/followers","following_url":"https://api.github.com/users/tpavlek/following{/other_user}","gists_url":"https://api.github.com/users/tpavlek/gists{/gist_id}","starred_url":"https://api.github.com/users/tpavlek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tpavlek/subscriptions","organizations_url":"https://api.github.com/users/tpavlek/orgs","repos_url":"https://api.github.com/users/tpavlek/repos","events_url":"https://api.github.com/users/tpavlek/events{/privacy}","received_events_url":"https://api.github.com/users/tpavlek/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/lucadegasperi/oauth2-server-laravel/labels/proposal","name":"proposal","color":"fbca04"}],"state":"open","locked":false,"assignee":{"login":"lucadegasperi","id":820687,"avatar_url":"https://avatars.githubusercontent.com/u/820687?v=3","gravatar_id":"","url":"https://api.github.com/users/lucadegasperi","html_url":"https://github.com/lucadegasperi","followers_url":"https://api.github.com/users/lucadegasperi/followers","following_url":"https://api.github.com/users/lucadegasperi/following{/other_user}","gists_url":"https://api.github.com/users/lucadegasperi/gists{/gist_id}","starred_url":"https://api.github.com/users/lucadegasperi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lucadegasperi/subscriptions","organizations_url":"https://api.github.com/users/lucadegasperi/orgs","repos_url":"https://api.github.com/users/lucadegasperi/repos","events_url":"https://api.github.com/users/lucadegasperi/events{/privacy}","received_events_url":"https://api.github.com/users/lucadegasperi/received_events","type":"User","site_admin":false},"milestone":null,"comments":1,"created_at":"2015-10-23T16:42:59Z","updated_at":"2015-10-30T08:29:49Z","closed_at":null,"body":"The various methods:\r\n\r\n```\r\ngetResourceOwnerId()\r\ngetClientId()\r\ngetResourceOwnerType()\r\ngetScopes()\r\nhasScope($scope)\r\n```\r\n\r\nall are internally implemented by calling `->getAccessToken()`. If these are called in the scenario where there is currently no active session with an access token, all of them will fail with `called {method} on null` which isn't a very helpful error, and causes a lot of confusion while debugging.\r\n\r\nLikely the best solution would be to make a `NoActiveAccessTokenException` that gets thrown whenever one of these methods attempts to be called without an access token."},"comment":{"url":"https://api.github.com/repos/lucadegasperi/oauth2-server-laravel/issues/comments/152459323","html_url":"https://github.com/lucadegasperi/oauth2-server-laravel/issues/580#issuecomment-152459323","issue_url":"https://api.github.com/repos/lucadegasperi/oauth2-server-laravel/issues/580","id":152459323,"user":{"login":"lucadegasperi","id":820687,"avatar_url":"https://avatars.githubusercontent.com/u/820687?v=3","gravatar_id":"","url":"https://api.github.com/users/lucadegasperi","html_url":"https://github.com/lucadegasperi","followers_url":"https://api.github.com/users/lucadegasperi/followers","following_url":"https://api.github.com/users/lucadegasperi/following{/other_user}","gists_url":"https://api.github.com/users/lucadegasperi/gists{/gist_id}","starred_url":"https://api.github.com/users/lucadegasperi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lucadegasperi/subscriptions","organizations_url":"https://api.github.com/users/lucadegasperi/orgs","repos_url":"https://api.github.com/users/lucadegasperi/repos","events_url":"https://api.github.com/users/lucadegasperi/events{/privacy}","received_events_url":"https://api.github.com/users/lucadegasperi/received_events","type":"User","site_admin":false},"created_at":"2015-10-30T08:29:49Z","updated_at":"2015-10-30T08:29:49Z","body":"I'll accept a pull request on this :)"}}