summaryrefslogtreecommitdiff
path: root/src/leap/base
diff options
context:
space:
mode:
authorkali <kali@leap.se>2012-12-18 07:17:56 +0900
committerkali <kali@leap.se>2012-12-18 07:17:56 +0900
commit34cdc516cbdef476d0329fff5d09d6eb0e85431f (patch)
treed3c5165666317a9e8f7219c53a8a468969db9e2f /src/leap/base
parent9d2869d9b9abdcf4e63705e659fa4369137a428e (diff)
freeze requests requirement lower than 1.0
srp auth breaking with 1.0 api
Diffstat (limited to 'src/leap/base')
-rw-r--r--src/leap/base/auth.py14
1 files changed, 2 insertions, 12 deletions
diff --git a/src/leap/base/auth.py b/src/leap/base/auth.py
index ec854cf0..ecc24179 100644
--- a/src/leap/base/auth.py
+++ b/src/leap/base/auth.py
@@ -142,9 +142,6 @@ class SRPAuth(requests.auth.AuthBase):
self.init_srp()
- def get_json_data(self, response):
- return json.loads(response.content)
-
def init_srp(self):
usr = srp.User(
self.username,
@@ -175,8 +172,7 @@ class SRPAuth(requests.auth.AuthBase):
raise SRPAuthenticationError(
"No valid response (salt).")
- # XXX should get auth_result.json instead
- self.init_data = self.get_json_data(init_session)
+ self.init_data = init_session.json
return self.init_data
def get_server_proof_data(self):
@@ -194,13 +190,7 @@ class SRPAuth(requests.auth.AuthBase):
raise SRPAuthenticationError(
"No valid response (HAMK).")
- # XXX should get auth_result.json instead
- try:
- self.auth_data = self.get_json_data(auth_result)
- except ValueError:
- raise SRPAuthenticationError(
- "No valid data sent (HAMK)")
-
+ self.auth_data = auth_result.json
return self.auth_data
def authenticate(self):