def isRevoked(self): expiry = time.mktime(self.create_date.timetuple()) + self.expires_in if datetime.frometimestamp(expiry) < datetime.utcnow(): self.revoke() return self.revoked