summaryrefslogtreecommitdiff
path: root/client/src/leap/soledad/client/_secrets/storage.py
diff options
context:
space:
mode:
authordrebs <drebs@leap.se>2017-02-23 18:18:39 -0300
committerdrebs <drebs@leap.se>2017-02-23 18:18:39 -0300
commit2422561268aa0214d8521ef5d2f456318391711d (patch)
treecf7f9562185d8787bc23d04e81d613c08d19d42e /client/src/leap/soledad/client/_secrets/storage.py
parent459c5efd59e2ebaa21e5c461c275d866a43534e8 (diff)
[refactor] use get_token in client secrets api
Diffstat (limited to 'client/src/leap/soledad/client/_secrets/storage.py')
-rw-r--r--client/src/leap/soledad/client/_secrets/storage.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/client/src/leap/soledad/client/_secrets/storage.py b/client/src/leap/soledad/client/_secrets/storage.py
index 730926ee..5fde8988 100644
--- a/client/src/leap/soledad/client/_secrets/storage.py
+++ b/client/src/leap/soledad/client/_secrets/storage.py
@@ -33,16 +33,21 @@ logger = getLogger(__name__)
class SecretsStorage(EmitMixin):
- def __init__(self, uuid, get_pass, url, local_path, creds, userid,
+ def __init__(self, uuid, get_pass, url, local_path, get_token, userid,
shared_db=None):
self._uuid = uuid
self._get_pass = get_pass
self._local_path = local_path
+ self._get_token = get_token
self._userid = userid
- self._shared_db = shared_db or self._init_shared_db(url, creds)
+ self._shared_db = shared_db or self._init_shared_db(url, self._creds)
self.__remote_doc = None
+ @property
+ def _creds(self):
+ return {'token': {'uuid': self._uuid, 'token': self._get_token()}}
+
#
# local storage
#