summaryrefslogtreecommitdiff
path: root/src/leap/soledad/auth.py
diff options
context:
space:
mode:
authordrebs <drebs@leap.se>2013-04-30 17:41:31 -0300
committerdrebs <drebs@leap.se>2013-04-30 17:41:31 -0300
commit516a5adb4f8328bd94446f4ea7ad0bc9298d7bfb (patch)
tree7ce57bc0a824a31e519ee18cebe11e3e1918ef97 /src/leap/soledad/auth.py
parent1e9b0e85a5de03f399c0cf52f46458dc6e77e103 (diff)
Use uuid instead of address.
Diffstat (limited to 'src/leap/soledad/auth.py')
-rw-r--r--src/leap/soledad/auth.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/leap/soledad/auth.py b/src/leap/soledad/auth.py
index 094278dc..080bb806 100644
--- a/src/leap/soledad/auth.py
+++ b/src/leap/soledad/auth.py
@@ -27,16 +27,16 @@ they can do token-based auth requests to the Soledad server.
from u1db.remote.http_client import HTTPClientBase
-def set_token_credentials(self, address, token):
+def set_token_credentials(self, uuid, token):
"""
Store given credentials so we can sign the request later.
- @param address: The user's address.
- @type address: str
+ @param uuid: The user's uuid.
+ @type uuid: str
@param token: The authentication token.
@type token: str
"""
- self._creds = {'token': (address, token)}
+ self._creds = {'token': (uuid, token)}
def _sign_request(self, method, url_query, params):
@@ -51,8 +51,8 @@ def _sign_request(self, method, url_query, params):
@type param: list
"""
if 'token' in self._creds:
- address, token = self._creds['token']
- auth = '%s:%s' % (address, token)
+ uuid, token = self._creds['token']
+ auth = '%s:%s' % (uuid, token)
return [('Authorization', 'Token %s' % auth.encode('base64'))]
else:
return HTTPClientBase._sign_request(self, method, url_query, params)