{"action":"created","issue":{"url":"https://api.github.com/repos/johnbrett/hapi-auth-bearer-token/issues/17","labels_url":"https://api.github.com/repos/johnbrett/hapi-auth-bearer-token/issues/17/labels{/name}","comments_url":"https://api.github.com/repos/johnbrett/hapi-auth-bearer-token/issues/17/comments","events_url":"https://api.github.com/repos/johnbrett/hapi-auth-bearer-token/issues/17/events","html_url":"https://github.com/johnbrett/hapi-auth-bearer-token/issues/17","id":64971098,"number":17,"title":"Add support for authorization payload","user":{"login":"JakubJagoda","id":1622378,"avatar_url":"https://avatars.githubusercontent.com/u/1622378?v=3","gravatar_id":"","url":"https://api.github.com/users/JakubJagoda","html_url":"https://github.com/JakubJagoda","followers_url":"https://api.github.com/users/JakubJagoda/followers","following_url":"https://api.github.com/users/JakubJagoda/following{/other_user}","gists_url":"https://api.github.com/users/JakubJagoda/gists{/gist_id}","starred_url":"https://api.github.com/users/JakubJagoda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JakubJagoda/subscriptions","organizations_url":"https://api.github.com/users/JakubJagoda/orgs","repos_url":"https://api.github.com/users/JakubJagoda/repos","events_url":"https://api.github.com/users/JakubJagoda/events{/privacy}","received_events_url":"https://api.github.com/users/JakubJagoda/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/johnbrett/hapi-auth-bearer-token/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":{"login":"johnbrett","id":4015939,"avatar_url":"https://avatars.githubusercontent.com/u/4015939?v=3","gravatar_id":"","url":"https://api.github.com/users/johnbrett","html_url":"https://github.com/johnbrett","followers_url":"https://api.github.com/users/johnbrett/followers","following_url":"https://api.github.com/users/johnbrett/following{/other_user}","gists_url":"https://api.github.com/users/johnbrett/gists{/gist_id}","starred_url":"https://api.github.com/users/johnbrett/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johnbrett/subscriptions","organizations_url":"https://api.github.com/users/johnbrett/orgs","repos_url":"https://api.github.com/users/johnbrett/repos","events_url":"https://api.github.com/users/johnbrett/events{/privacy}","received_events_url":"https://api.github.com/users/johnbrett/received_events","type":"User","site_admin":false},"milestone":null,"comments":2,"created_at":"2015-03-28T18:10:42Z","updated_at":"2015-03-30T09:46:26Z","closed_at":null,"body":"In hapi authorization scheme is expected to return `authenticate` function, however the data stored in payload is then not available to the user. But the scheme can also return `payload` function which then can be used to use payload data during authorization.\r\n\r\nI needed this functionality in one of the projects, therefore I already wrote the necessary code: https://github.com/johnbrett/hapi-auth-bearer-token/pull/18\r\n(however I didn't dig into the plugin structure, so maybe this can be (and should) written in other fashion)"},"comment":{"url":"https://api.github.com/repos/johnbrett/hapi-auth-bearer-token/issues/comments/87617131","html_url":"https://github.com/johnbrett/hapi-auth-bearer-token/issues/17#issuecomment-87617131","issue_url":"https://api.github.com/repos/johnbrett/hapi-auth-bearer-token/issues/17","id":87617131,"user":{"login":"JakubJagoda","id":1622378,"avatar_url":"https://avatars.githubusercontent.com/u/1622378?v=3","gravatar_id":"","url":"https://api.github.com/users/JakubJagoda","html_url":"https://github.com/JakubJagoda","followers_url":"https://api.github.com/users/JakubJagoda/followers","following_url":"https://api.github.com/users/JakubJagoda/following{/other_user}","gists_url":"https://api.github.com/users/JakubJagoda/gists{/gist_id}","starred_url":"https://api.github.com/users/JakubJagoda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JakubJagoda/subscriptions","organizations_url":"https://api.github.com/users/JakubJagoda/orgs","repos_url":"https://api.github.com/users/JakubJagoda/repos","events_url":"https://api.github.com/users/JakubJagoda/events{/privacy}","received_events_url":"https://api.github.com/users/JakubJagoda/received_events","type":"User","site_admin":false},"created_at":"2015-03-30T09:46:26Z","updated_at":"2015-03-30T09:46:26Z","body":"Sure, @johnbrett, I'll take care of the tests today's evening (in a few hours)"}}