{"action":"closed","issue":{"url":"https://api.github.com/repos/lucadegasperi/oauth2-server-laravel/issues/300","labels_url":"https://api.github.com/repos/lucadegasperi/oauth2-server-laravel/issues/300/labels{/name}","comments_url":"https://api.github.com/repos/lucadegasperi/oauth2-server-laravel/issues/300/comments","events_url":"https://api.github.com/repos/lucadegasperi/oauth2-server-laravel/issues/300/events","html_url":"https://github.com/lucadegasperi/oauth2-server-laravel/issues/300","id":57251763,"number":300,"title":"Checking user data in filters","user":{"login":"jmazurpl","id":4668675,"avatar_url":"https://avatars.githubusercontent.com/u/4668675?v=3","gravatar_id":"","url":"https://api.github.com/users/jmazurpl","html_url":"https://github.com/jmazurpl","followers_url":"https://api.github.com/users/jmazurpl/followers","following_url":"https://api.github.com/users/jmazurpl/following{/other_user}","gists_url":"https://api.github.com/users/jmazurpl/gists{/gist_id}","starred_url":"https://api.github.com/users/jmazurpl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmazurpl/subscriptions","organizations_url":"https://api.github.com/users/jmazurpl/orgs","repos_url":"https://api.github.com/users/jmazurpl/repos","events_url":"https://api.github.com/users/jmazurpl/events{/privacy}","received_events_url":"https://api.github.com/users/jmazurpl/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-02-10T23:02:27Z","updated_at":"2015-02-16T14:24:29Z","closed_at":"2015-02-16T14:24:29Z","body":"Hi,\r\n\r\nI'm wrting API secured by oAuth. My users have their roles. I want to check their roles with filter:\r\n\r\n    Route::filter('admin', function()\r\n    {\r\n        if (!(Auth::check() && Auth::user()->isInRole(Roles::Administrator)))\r\n        {\r\n            return Response::json(null, 403);\r\n        }\r\n    });\r\n\r\nBut Auth::check() returns false - its becouse route is secured with oAuth. How can I get user making the current request in filter?\r\n"}}