Fix situation where authtoken wasnt updated for the toolbox request headers

This commit is contained in:
Jaime van Kessel 2019-04-25 16:16:44 +02:00
parent 078707a726
commit 5f76070f05
3 changed files with 11 additions and 1 deletions

View file

@ -34,6 +34,8 @@ class AuthorizationService:
# Emit signal when authentication failed.
onAuthenticationError = Signal()
accessTokenChanged = Signal()
def __init__(self, settings: "OAuth2Settings", preferences: Optional["Preferences"] = None) -> None:
self._settings = settings
self._auth_helpers = AuthorizationHelpers(settings)
@ -214,6 +216,8 @@ class AuthorizationService:
self._user_profile = None
self._preferences.resetPreference(self._settings.AUTH_DATA_PREFERENCE_KEY)
self.accessTokenChanged.emit()
def _onMessageActionTriggered(self, _, action):
if action == "retry":
self.loadAuthDataFromPreferences()