summaryrefslogtreecommitdiff
path: root/users/test/integration/api/python
diff options
context:
space:
mode:
authorAzul <azul@leap.se>2012-10-06 19:39:48 +0200
committerAzul <azul@leap.se>2012-10-06 19:40:08 +0200
commit5267a127ee967b1d89df6033cc9869715e960886 (patch)
tree0776de7a5328643926cabffff52e40a7e0328367 /users/test/integration/api/python
parente264e7354788c0b7eff7bb296eed9c59304cc8b8 (diff)
comment out debugging lines
Diffstat (limited to 'users/test/integration/api/python')
-rwxr-xr-xusers/test/integration/api/python/flow_with_srp.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/users/test/integration/api/python/flow_with_srp.py b/users/test/integration/api/python/flow_with_srp.py
index 3bbbc71..0a11aec 100755
--- a/users/test/integration/api/python/flow_with_srp.py
+++ b/users/test/integration/api/python/flow_with_srp.py
@@ -16,24 +16,24 @@ def id_generator(size=6, chars=string.ascii_uppercase + string.digits):
return ''.join(random.choice(chars) for x in range(size))
# using globals for a start
-server = 'http://localhost:3000'
+server = 'http://springbok/1/'
login = id_generator()
password = id_generator() + id_generator()
-print ' username = "' + login + '"'
-print ' password = "' + password + '"'
+# print ' username = "' + login + '"'
+# print ' password = "' + password + '"'
# log the server communication
def print_and_parse(response):
# print response.request.method + ': ' + response.url
# print " " + json.dumps(response.request.data)
- print " -> " + response.text
+ # print " -> " + response.text
return json.loads(response.text)
def signup(session):
salt, vkey = srp.create_salted_verification_key( login, password, srp.SHA256, srp.NG_1024 )
- print ' salt = "' + binascii.hexlify(salt) + '"'
- print ' v = "' + binascii.hexlify(vkey) + '"'
+ # print ' salt = "' + binascii.hexlify(salt) + '"'
+ # print ' v = "' + binascii.hexlify(vkey) + '"'
user_params = {
'user[login]': login,
'user[password_verifier]': binascii.hexlify(vkey),
@@ -45,16 +45,16 @@ usr = srp.User( login, password, srp.SHA256, srp.NG_1024 )
def authenticate(session, login):
uname, A = usr.start_authentication()
- print ' aa = "' + binascii.hexlify(A) + '"'
+ # print ' aa = "' + binascii.hexlify(A) + '"'
params = {
'login': uname,
'A': binascii.hexlify(A)
}
init = print_and_parse(session.post(server + '/sessions', data = params))
# print ' b = "' + init['b'] + '"'
- print ' bb = "' + init['B'] + '"'
+ # print ' bb = "' + init['B'] + '"'
M = usr.process_challenge( safe_unhexlify(init['salt']), safe_unhexlify(init['B']) )
- print ' m = "' + binascii.hexlify(M) + '"'
+ # print ' m = "' + binascii.hexlify(M) + '"'
return session.put(server + '/sessions/' + login,
data = {'client_auth': binascii.hexlify(M)})