{"action":"created","issue":{"url":"https://api.github.com/repos/auth0/node-jsonwebtoken/issues/172","repository_url":"https://api.github.com/repos/auth0/node-jsonwebtoken","labels_url":"https://api.github.com/repos/auth0/node-jsonwebtoken/issues/172/labels{/name}","comments_url":"https://api.github.com/repos/auth0/node-jsonwebtoken/issues/172/comments","events_url":"https://api.github.com/repos/auth0/node-jsonwebtoken/issues/172/events","html_url":"https://github.com/auth0/node-jsonwebtoken/pull/172","id":131072619,"number":172,"title":"Added API endpoint for token refresh","user":{"login":"jppellerin","id":4185657,"avatar_url":"https://avatars2.githubusercontent.com/u/4185657?v=4","gravatar_id":"","url":"https://api.github.com/users/jppellerin","html_url":"https://github.com/jppellerin","followers_url":"https://api.github.com/users/jppellerin/followers","following_url":"https://api.github.com/users/jppellerin/following{/other_user}","gists_url":"https://api.github.com/users/jppellerin/gists{/gist_id}","starred_url":"https://api.github.com/users/jppellerin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jppellerin/subscriptions","organizations_url":"https://api.github.com/users/jppellerin/orgs","repos_url":"https://api.github.com/users/jppellerin/repos","events_url":"https://api.github.com/users/jppellerin/events{/privacy}","received_events_url":"https://api.github.com/users/jppellerin/received_events","type":"User","site_admin":false},"labels":[{"id":326915042,"url":"https://api.github.com/repos/auth0/node-jsonwebtoken/labels/next-major","name":"next-major","color":"fef2c0","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":26,"created_at":"2016-02-03T16:14:08Z","updated_at":"2017-07-14T11:59:08Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/auth0/node-jsonwebtoken/pulls/172","html_url":"https://github.com/auth0/node-jsonwebtoken/pull/172","diff_url":"https://github.com/auth0/node-jsonwebtoken/pull/172.diff","patch_url":"https://github.com/auth0/node-jsonwebtoken/pull/172.patch"},"body":"According to issue #122, there was some interest in having an endpoint to refresh a token.\n\nA refresh is considered to have the same token returned, but with a later expiry time.\n\nThis function takes in a decoded token, copies the attributes of this token over, and with that data, proceeds to signing a new token.  The only piece of data that is replaced is the `expiresIn` value, which is passed in the function parameters.  By extension, the `iat` value is also changed since a new token is created.\n"},"comment":{"url":"https://api.github.com/repos/auth0/node-jsonwebtoken/issues/comments/315342596","html_url":"https://github.com/auth0/node-jsonwebtoken/pull/172#issuecomment-315342596","issue_url":"https://api.github.com/repos/auth0/node-jsonwebtoken/issues/172","id":315342596,"user":{"login":"fiddur","id":148166,"avatar_url":"https://avatars5.githubusercontent.com/u/148166?v=4","gravatar_id":"","url":"https://api.github.com/users/fiddur","html_url":"https://github.com/fiddur","followers_url":"https://api.github.com/users/fiddur/followers","following_url":"https://api.github.com/users/fiddur/following{/other_user}","gists_url":"https://api.github.com/users/fiddur/gists{/gist_id}","starred_url":"https://api.github.com/users/fiddur/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fiddur/subscriptions","organizations_url":"https://api.github.com/users/fiddur/orgs","repos_url":"https://api.github.com/users/fiddur/repos","events_url":"https://api.github.com/users/fiddur/events{/privacy}","received_events_url":"https://api.github.com/users/fiddur/received_events","type":"User","site_admin":false},"created_at":"2017-07-14T11:59:08Z","updated_at":"2017-07-14T11:59:08Z","body":"Fixed by documentation: #371 "}}
{"actor":{"display_login":"fiddur"}}