{"action":"created","issue":{"url":"https://api.github.com/repos/pycrest/PyCrest/issues/46","repository_url":"https://api.github.com/repos/pycrest/PyCrest","labels_url":"https://api.github.com/repos/pycrest/PyCrest/issues/46/labels{/name}","comments_url":"https://api.github.com/repos/pycrest/PyCrest/issues/46/comments","events_url":"https://api.github.com/repos/pycrest/PyCrest/issues/46/events","html_url":"https://github.com/pycrest/PyCrest/issues/46","id":181646965,"number":46,"title":"Need some form of notification when pycrest acquires a new access token from the refresh token","user":{"login":"wtfrank","id":1202593,"avatar_url":"https://avatars.githubusercontent.com/u/1202593?v=3","gravatar_id":"","url":"https://api.github.com/users/wtfrank","html_url":"https://github.com/wtfrank","followers_url":"https://api.github.com/users/wtfrank/followers","following_url":"https://api.github.com/users/wtfrank/following{/other_user}","gists_url":"https://api.github.com/users/wtfrank/gists{/gist_id}","starred_url":"https://api.github.com/users/wtfrank/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wtfrank/subscriptions","organizations_url":"https://api.github.com/users/wtfrank/orgs","repos_url":"https://api.github.com/users/wtfrank/repos","events_url":"https://api.github.com/users/wtfrank/events{/privacy}","received_events_url":"https://api.github.com/users/wtfrank/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-10-07T11:34:47Z","updated_at":"2016-10-08T19:14:50Z","closed_at":null,"body":"When we initialise a pycrest object we pass in the long-lived refresh token which pycrest uses to get a short-lived access token via web request.\r\n\r\nWhile this access token is still valid, it would be desirable to retain this token and avoid some situations where you make another call to obtain a short-lived access token before the access token had expired.\r\n\r\nWe know when the access token will expire, so if we triggered some kind of event when a new access token was acquired, we could store this along with the expiry time, then when initialising a future pycrest object we could save a web request if the old access token had not expired."},"comment":{"url":"https://api.github.com/repos/pycrest/PyCrest/issues/comments/252442780","html_url":"https://github.com/pycrest/PyCrest/issues/46#issuecomment-252442780","issue_url":"https://api.github.com/repos/pycrest/PyCrest/issues/46","id":252442780,"user":{"login":"hkraal","id":1006756,"avatar_url":"https://avatars.githubusercontent.com/u/1006756?v=3","gravatar_id":"","url":"https://api.github.com/users/hkraal","html_url":"https://github.com/hkraal","followers_url":"https://api.github.com/users/hkraal/followers","following_url":"https://api.github.com/users/hkraal/following{/other_user}","gists_url":"https://api.github.com/users/hkraal/gists{/gist_id}","starred_url":"https://api.github.com/users/hkraal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hkraal/subscriptions","organizations_url":"https://api.github.com/users/hkraal/orgs","repos_url":"https://api.github.com/users/hkraal/repos","events_url":"https://api.github.com/users/hkraal/events{/privacy}","received_events_url":"https://api.github.com/users/hkraal/received_events","type":"User","site_admin":false},"created_at":"2016-10-08T19:14:50Z","updated_at":"2016-10-08T19:14:50Z","body":"I'm probably missing your point but why would you care about a short lived token expiry when you got the long lived token which will be valid forever? If the short lived token has been expired on the authed instance it gets automaticly refreshed (https://github.com/pycrest/PyCrest/blob/master/pycrest/eve.py#L425) and as such you don't need to worry about it's expiry?"}}
{"actor":{"display_login":"hkraal"}}