{"action":"opened","issue":{"url":"https://api.github.com/repos/pyca/cryptography/issues/1811","labels_url":"https://api.github.com/repos/pyca/cryptography/issues/1811/labels{/name}","comments_url":"https://api.github.com/repos/pyca/cryptography/issues/1811/comments","events_url":"https://api.github.com/repos/pyca/cryptography/issues/1811/events","html_url":"https://github.com/pyca/cryptography/issues/1811","id":65971927,"number":1811,"title":"Fernet should provide an is_expired staticmethod/classmethod","user":{"login":"tlynn","id":329026,"avatar_url":"https://avatars.githubusercontent.com/u/329026?v=3","gravatar_id":"","url":"https://api.github.com/users/tlynn","html_url":"https://github.com/tlynn","followers_url":"https://api.github.com/users/tlynn/followers","following_url":"https://api.github.com/users/tlynn/following{/other_user}","gists_url":"https://api.github.com/users/tlynn/gists{/gist_id}","starred_url":"https://api.github.com/users/tlynn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tlynn/subscriptions","organizations_url":"https://api.github.com/users/tlynn/orgs","repos_url":"https://api.github.com/users/tlynn/repos","events_url":"https://api.github.com/users/tlynn/events{/privacy}","received_events_url":"https://api.github.com/users/tlynn/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-04-02T17:22:45Z","updated_at":"2015-04-02T17:22:45Z","closed_at":null,"body":"No decryption [key] is needed to check whether a token has expired. A \"Fernet.is_expired(token, ttl=...)\" API would e.g. allow token holders to check whether they need to refresh a token without a round trip.\r\n\r\nIt could also be useful to expose the timestamp (possibly as a datetime.datetime, but probably just as an int) e.g. so that old tokens can be pruned from a list."}}