Add property for the accessToken

CURA-5744
This commit is contained in:
Jaime van Kessel 2018-09-26 17:12:00 +02:00
parent 067e59a254
commit 16ff1c3712

View File

@ -87,6 +87,10 @@ class Account(QObject):
return None return None
return user_profile.profile_image_url return user_profile.profile_image_url
@pyqtProperty(str, notify=loginStateChanged)
def accessToken(self) -> Optional[str]:
return self._authorization_service.getAccessToken()
# Get the profile of the logged in user # Get the profile of the logged in user
# @returns None if no user is logged in, a dict containing user_id, username and profile_image_url # @returns None if no user is logged in, a dict containing user_id, username and profile_image_url
@pyqtProperty("QVariantMap", notify = loginStateChanged) @pyqtProperty("QVariantMap", notify = loginStateChanged)