summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAzul <azul@leap.se>2012-08-02 15:24:00 +0200
committerAzul <azul@leap.se>2012-08-02 15:24:00 +0200
commit536a90f154ef24800a258fdbfe625917f57456f7 (patch)
treefa1cd810d7589b607fd1dbc910028fcc5339b4cc
parent22384a9ef3b75d7b37b99551db2575cb19dafe6d (diff)
make sure our urls still work with srp-js
-rw-r--r--example/http-srp.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/example/http-srp.rb b/example/http-srp.rb
index ed07896..65b7be1 100644
--- a/example/http-srp.rb
+++ b/example/http-srp.rb
@@ -17,6 +17,8 @@ end
# TODO: Client should generate the salt!
# Getting things to work the srp-js way first.
+# Also these are the urls srp-js is used to - it's easy
+# to overwrite them though by writing your own srp-js wrapper
post '/register/salt/' do
Log.clear
@user = User.new(params.delete('I'))
@@ -24,7 +26,7 @@ post '/register/salt/' do
{ :salt => @user.salt.to_s(16) }.to_json
end
-post '/register/user' do
+post '/register/user/' do
User.current.verifier = params.delete('v').hex
content_type :json
{ :ok => true }.to_json
@@ -35,7 +37,7 @@ get '/login' do
erb :login
end
-post '/handshake' do
+post '/handshake/' do
@user = User.current
Log.log(:handshake, params)
@handshake = @user.handshake(params)
@@ -44,7 +46,7 @@ post '/handshake' do
@handshake.to_json
end
-post '/authenticate' do
+post '/authenticate/' do
@user = User.current
Log.log(:authenticate, params)
@auth = @user.validate(params)