summaryrefslogtreecommitdiff
path: root/client/src/leap/soledad/client/http_target/api.py
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/leap/soledad/client/http_target/api.py')
-rw-r--r--client/src/leap/soledad/client/http_target/api.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/client/src/leap/soledad/client/http_target/api.py b/client/src/leap/soledad/client/http_target/api.py
index dcc762f6..94354092 100644
--- a/client/src/leap/soledad/client/http_target/api.py
+++ b/client/src/leap/soledad/client/http_target/api.py
@@ -40,6 +40,10 @@ class SyncTargetAPI(SyncTarget):
self._sync_decr_pool.stop()
yield self._http.close()
+ @property
+ def uuid(self):
+ return self._uuid
+
def set_creds(self, creds):
"""
Update credentials.
@@ -49,6 +53,7 @@ class SyncTargetAPI(SyncTarget):
"""
uuid = creds['token']['uuid']
token = creds['token']['token']
+ self._uuid = uuid
auth = '%s:%s' % (uuid, token)
b64_token = base64.b64encode(auth)
self._auth_header = {'Authorization': ['Token %s' % b64_token]}