From 1b9009c0b67e6209abbb7047b1edea7961bd3256 Mon Sep 17 00:00:00 2001 From: drebs Date: Tue, 30 Apr 2013 15:37:37 -0300 Subject: Update tests with monkey patching to always use our SyncTarget. --- src/leap/soledad/auth.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/leap/soledad/auth.py') diff --git a/src/leap/soledad/auth.py b/src/leap/soledad/auth.py index 44755d58..35f4700f 100644 --- a/src/leap/soledad/auth.py +++ b/src/leap/soledad/auth.py @@ -21,6 +21,9 @@ Methods for token-based authentication. """ +from u1db.remote.http_client import HTTPClientBase + + def set_token_credentials(self, address, token): self._creds = {'token': (address, token)} @@ -30,3 +33,5 @@ def _sign_request(self, method, url_query, params): address, token = self._creds['token'] auth = '%s:%s' % (address, token) return [('Authorization', 'Token %s' % auth.encode('base64'))] + else: + return HTTPClientBase._sign_request(self, method, url_query, params) -- cgit v1.2.3