Calculate expiry date to determine if token refresh is needed

This commit is contained in:
ChrisTerBeke 2019-02-08 21:39:45 +01:00
parent 9d6bd4b29a
commit 05c4b6012e
No known key found for this signature in database
GPG key ID: A49F1AB9D7E0C263
5 changed files with 19 additions and 15 deletions

View file

@ -1,6 +1,6 @@
# Copyright (c) 2018 Ultimaker B.V.
# Cura is released under the terms of the LGPLv3 or higher.
from datetime import datetime
from typing import Optional
@ -38,6 +38,7 @@ class AuthenticationResponse(BaseModel):
expires_in = None # type: Optional[str]
scope = None # type: Optional[str]
err_message = None # type: Optional[str]
received_at = None # type: Optional[datetime]
# Response status template.