{"action":"created","issue":{"url":"https://api.github.com/repos/ideaq/hapi-auth-jwt2/issues/29","labels_url":"https://api.github.com/repos/ideaq/hapi-auth-jwt2/issues/29/labels{/name}","comments_url":"https://api.github.com/repos/ideaq/hapi-auth-jwt2/issues/29/comments","events_url":"https://api.github.com/repos/ideaq/hapi-auth-jwt2/issues/29/events","html_url":"https://github.com/ideaq/hapi-auth-jwt2/issues/29","id":68145053,"number":29,"title":"Can't pass jsonwebtoken.verify options","user":{"login":"Think7","id":6184590,"avatar_url":"https://avatars.githubusercontent.com/u/6184590?v=3","gravatar_id":"","url":"https://api.github.com/users/Think7","html_url":"https://github.com/Think7","followers_url":"https://api.github.com/users/Think7/followers","following_url":"https://api.github.com/users/Think7/following{/other_user}","gists_url":"https://api.github.com/users/Think7/gists{/gist_id}","starred_url":"https://api.github.com/users/Think7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Think7/subscriptions","organizations_url":"https://api.github.com/users/Think7/orgs","repos_url":"https://api.github.com/users/Think7/repos","events_url":"https://api.github.com/users/Think7/events{/privacy}","received_events_url":"https://api.github.com/users/Think7/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ideaq/hapi-auth-jwt2/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-04-13T17:05:41Z","updated_at":"2015-04-13T17:14:54Z","closed_at":null,"body":"Currently, users of this package cannot pass in verify options for the jsonwebtokens module as shown here:\r\nhttps://www.npmjs.com/package/jsonwebtoken#jwt-verify-token-secretorpublickey-options-callback\r\n\r\nI have resolved this issue but am unfamiliar with source control and how to make a pull request.\r\nThe modified index.js for can be found here: http://pastebin.com/kibMGb11\r\n\r\nUsers now need only to pass in a verifyOptions object in the options object for the module.\r\nExample:\r\n\r\n```javascript\r\n    server.auth.strategy('jwt', 'jwt', true,\r\n        {\r\n            key: secret,\r\n            validateFunc: validate,\r\n            verifyOptions: {\r\n                ignoreExpiration: true\r\n            }\r\n        }\r\n    );\r\n```\r\nI also exported the JWT.sign method so now users of the package do not need to have specific requires for it in their project.\r\n"},"comment":{"url":"https://api.github.com/repos/ideaq/hapi-auth-jwt2/issues/comments/92429121","html_url":"https://github.com/ideaq/hapi-auth-jwt2/issues/29#issuecomment-92429121","issue_url":"https://api.github.com/repos/ideaq/hapi-auth-jwt2/issues/29","id":92429121,"user":{"login":"Think7","id":6184590,"avatar_url":"https://avatars.githubusercontent.com/u/6184590?v=3","gravatar_id":"","url":"https://api.github.com/users/Think7","html_url":"https://github.com/Think7","followers_url":"https://api.github.com/users/Think7/followers","following_url":"https://api.github.com/users/Think7/following{/other_user}","gists_url":"https://api.github.com/users/Think7/gists{/gist_id}","starred_url":"https://api.github.com/users/Think7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Think7/subscriptions","organizations_url":"https://api.github.com/users/Think7/orgs","repos_url":"https://api.github.com/users/Think7/repos","events_url":"https://api.github.com/users/Think7/events{/privacy}","received_events_url":"https://api.github.com/users/Think7/received_events","type":"User","site_admin":false},"created_at":"2015-04-13T17:14:54Z","updated_at":"2015-04-13T17:14:54Z","body":"Agreed however i ran into an issue:\r\n\r\nIf client makes a request for a JWT with an expiry time of 10 mins, after the expiry time, server is going to 401 them. I need to allow users to send a potentially expired token and then check to see if they are allowed to renew their session (send them another JWT) without sending credentials over the wire a second+ time."}}