Permalink
Browse files

Update test page to current API

  • Loading branch information...
1 parent 5547362 commit 59a828d181a7aff93c2083add3e17356102dedee @ept ept committed Aug 13, 2012
Showing with 7 additions and 7 deletions.
  1. +7 −7 js/test.html
View
@@ -26,9 +26,9 @@
$('#publickey').val(private_key.publicKey().toBase64());
var auth_request = octokey.authRequest({
- challenge: forge.util.hexToBytes($('#challenge').val()),
- request_url: forge.util.encodeUtf8($('#request_url').val()),
- username: forge.util.encodeUtf8($('#username').val())
+ challenge: $('#challenge').val(),
+ request_url: $('#request_url').val(),
+ username: $('#username').val()
});
auth_request.sign(private_key);
$('#authrequest').val(auth_request.toBase64());
@@ -46,17 +46,17 @@
<form>
<p>
<label for="username">Username (UTF-8):</label><br>
- <input type="text" id="username" name="username" value="alfred@test.linkedin.com">
+ <input type="text" id="username" name="username" value="foo">
</p>
<p>
- <label for="challenge">Challenge (hex):</label><br>
- <input type="text" id="challenge" name="challenge" value="2969b93cc402dd4612158ff180b8a61ef2e12dcb88770459a039b851f1000ced">
+ <label for="challenge">Challenge (base64):</label><br>
+ <input type="text" id="challenge" name="challenge" value="KWm5PMQC3UYSFY/xgLimHvLhLcuIdwRZoDm4UfEADO0=">
</p>
<p>
<label for="request_url">Request URL:</label><br>
- <input type="text" id="request_url" name="request_url" value="https://eat1-app45.corp.linkedin.com:8443/uas/login-submit">
+ <input type="text" id="request_url" name="request_url" value="https://www.example.com/login">
</p>
<p>

0 comments on commit 59a828d

Please sign in to comment.