{"action":"created","issue":{"url":"https://api.github.com/repos/tuupola/slim-jwt-auth/issues/96","repository_url":"https://api.github.com/repos/tuupola/slim-jwt-auth","labels_url":"https://api.github.com/repos/tuupola/slim-jwt-auth/issues/96/labels{/name}","comments_url":"https://api.github.com/repos/tuupola/slim-jwt-auth/issues/96/comments","events_url":"https://api.github.com/repos/tuupola/slim-jwt-auth/issues/96/events","html_url":"https://github.com/tuupola/slim-jwt-auth/issues/96","id":297752386,"node_id":"MDU6SXNzdWUyOTc3NTIzODY=","number":96,"title":"Get request  in error callback - 3.x","user":{"login":"X-Tender","id":1413979,"node_id":"MDQ6VXNlcjE0MTM5Nzk=","avatar_url":"https://avatars3.githubusercontent.com/u/1413979?v=4","gravatar_id":"","url":"https://api.github.com/users/X-Tender","html_url":"https://github.com/X-Tender","followers_url":"https://api.github.com/users/X-Tender/followers","following_url":"https://api.github.com/users/X-Tender/following{/other_user}","gists_url":"https://api.github.com/users/X-Tender/gists{/gist_id}","starred_url":"https://api.github.com/users/X-Tender/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/X-Tender/subscriptions","organizations_url":"https://api.github.com/users/X-Tender/orgs","repos_url":"https://api.github.com/users/X-Tender/repos","events_url":"https://api.github.com/users/X-Tender/events{/privacy}","received_events_url":"https://api.github.com/users/X-Tender/received_events","type":"User","site_admin":false},"labels":[{"id":344089052,"node_id":"MDU6TGFiZWwzNDQwODkwNTI=","url":"https://api.github.com/repos/tuupola/slim-jwt-auth/labels/3.x","name":"3.x","color":"207de5","default":false},{"id":198633137,"node_id":"MDU6TGFiZWwxOTg2MzMxMzc=","url":"https://api.github.com/repos/tuupola/slim-jwt-auth/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-02-16T11:16:54Z","updated_at":"2018-09-21T14:47:36Z","closed_at":null,"author_association":"NONE","body":"I try to implement following behaviour:\r\n1. User visit a page route which required authentification/valid token.\r\n2. user have no valid token so `error` callback jumps in\r\n3. I redirect the user to the login form\r\n(At this point I would like to get the URL the user tries to access and store it via a flash message for example )\r\n`return $response->withRedirect($container->get(\"router\")->pathFor(\"login\"), 301);`\r\n4. User logs in\r\n5. I see that the user tried to access an another page (from the flash message) and redirect him to the path\r\n\r\nThe problem is that I can't access the Request from the `error` callback and the `before` callback is only called when a token can be found and decoded.\r\n\r\nAny suggestions how this can be achieved?"},"comment":{"url":"https://api.github.com/repos/tuupola/slim-jwt-auth/issues/comments/423558225","html_url":"https://github.com/tuupola/slim-jwt-auth/issues/96#issuecomment-423558225","issue_url":"https://api.github.com/repos/tuupola/slim-jwt-auth/issues/96","id":423558225,"node_id":"MDEyOklzc3VlQ29tbWVudDQyMzU1ODIyNQ==","user":{"login":"taraldr","id":2229049,"node_id":"MDQ6VXNlcjIyMjkwNDk=","avatar_url":"https://avatars1.githubusercontent.com/u/2229049?v=4","gravatar_id":"","url":"https://api.github.com/users/taraldr","html_url":"https://github.com/taraldr","followers_url":"https://api.github.com/users/taraldr/followers","following_url":"https://api.github.com/users/taraldr/following{/other_user}","gists_url":"https://api.github.com/users/taraldr/gists{/gist_id}","starred_url":"https://api.github.com/users/taraldr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/taraldr/subscriptions","organizations_url":"https://api.github.com/users/taraldr/orgs","repos_url":"https://api.github.com/users/taraldr/repos","events_url":"https://api.github.com/users/taraldr/events{/privacy}","received_events_url":"https://api.github.com/users/taraldr/received_events","type":"User","site_admin":false},"created_at":"2018-09-21T14:47:36Z","updated_at":"2018-09-21T14:47:36Z","author_association":"NONE","body":"I too would love to see the Request available in the error callback 👍 "}}
{"actor":{"display_login":"taraldr"}}