{"action":"created","issue":{"url":"https://api.github.com/repos/hapijs/hapi-auth-cookie/issues/106","labels_url":"https://api.github.com/repos/hapijs/hapi-auth-cookie/issues/106/labels{/name}","comments_url":"https://api.github.com/repos/hapijs/hapi-auth-cookie/issues/106/comments","events_url":"https://api.github.com/repos/hapijs/hapi-auth-cookie/issues/106/events","html_url":"https://github.com/hapijs/hapi-auth-cookie/issues/106","id":127414994,"number":106,"title":"Validate function in readme not working","user":{"login":"Marcoevich","id":1243033,"avatar_url":"https://avatars.githubusercontent.com/u/1243033?v=3","gravatar_id":"","url":"https://api.github.com/users/Marcoevich","html_url":"https://github.com/Marcoevich","followers_url":"https://api.github.com/users/Marcoevich/followers","following_url":"https://api.github.com/users/Marcoevich/following{/other_user}","gists_url":"https://api.github.com/users/Marcoevich/gists{/gist_id}","starred_url":"https://api.github.com/users/Marcoevich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Marcoevich/subscriptions","organizations_url":"https://api.github.com/users/Marcoevich/orgs","repos_url":"https://api.github.com/users/Marcoevich/repos","events_url":"https://api.github.com/users/Marcoevich/events{/privacy}","received_events_url":"https://api.github.com/users/Marcoevich/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/hapijs/hapi-auth-cookie/labels/non-issue","name":"non-issue","color":"c7def8"}],"state":"open","locked":false,"assignee":{"login":"jaw187","id":885557,"avatar_url":"https://avatars.githubusercontent.com/u/885557?v=3","gravatar_id":"","url":"https://api.github.com/users/jaw187","html_url":"https://github.com/jaw187","followers_url":"https://api.github.com/users/jaw187/followers","following_url":"https://api.github.com/users/jaw187/following{/other_user}","gists_url":"https://api.github.com/users/jaw187/gists{/gist_id}","starred_url":"https://api.github.com/users/jaw187/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jaw187/subscriptions","organizations_url":"https://api.github.com/users/jaw187/orgs","repos_url":"https://api.github.com/users/jaw187/repos","events_url":"https://api.github.com/users/jaw187/events{/privacy}","received_events_url":"https://api.github.com/users/jaw187/received_events","type":"User","site_admin":false},"milestone":null,"comments":1,"created_at":"2016-01-19T10:28:09Z","updated_at":"2016-01-19T13:46:04Z","closed_at":null,"body":"I tried to use the validate function in your readme like this:\r\n\r\n        validateFunc: function (request, session, callback) {\r\n\r\n            cache.get(session.sid, (err, cached) => {\r\n\r\n                if (err) {\r\n                    return callback(err, false);\r\n                }\r\n\r\n                if (!cached) {\r\n                return callback(null, false);\r\n            }\r\n\r\n            return callback(null, true, cached.account);\r\n        });\r\n        }\r\n\r\nI get various syntax errors, like \"expression statement is not assignment or call\" on `app.get()` \r\n\r\nCould you test this function and let me know if it still works for you?\r\n"},"comment":{"url":"https://api.github.com/repos/hapijs/hapi-auth-cookie/issues/comments/172858378","html_url":"https://github.com/hapijs/hapi-auth-cookie/issues/106#issuecomment-172858378","issue_url":"https://api.github.com/repos/hapijs/hapi-auth-cookie/issues/106","id":172858378,"user":{"login":"jaw187","id":885557,"avatar_url":"https://avatars.githubusercontent.com/u/885557?v=3","gravatar_id":"","url":"https://api.github.com/users/jaw187","html_url":"https://github.com/jaw187","followers_url":"https://api.github.com/users/jaw187/followers","following_url":"https://api.github.com/users/jaw187/following{/other_user}","gists_url":"https://api.github.com/users/jaw187/gists{/gist_id}","starred_url":"https://api.github.com/users/jaw187/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jaw187/subscriptions","organizations_url":"https://api.github.com/users/jaw187/orgs","repos_url":"https://api.github.com/users/jaw187/repos","events_url":"https://api.github.com/users/jaw187/events{/privacy}","received_events_url":"https://api.github.com/users/jaw187/received_events","type":"User","site_admin":false},"created_at":"2016-01-19T13:46:04Z","updated_at":"2016-01-19T13:46:04Z","body":"Works fine for me.  Feel free to share your full code if you need additional review."}}