summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2017-10-27 15:30:55 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2017-10-27 15:30:55 +0200
commit7c0b9a4841b0713f63857584ecb593883bb8ad61 (patch)
tree99dcae9865fb0b9586af7da7132d70a4ae79cece
parent78e9a723e1a9afd42c84c57b2d1c9ff1b3de78f4 (diff)
downloadshare-7c0b9a4841b0713f63857584ecb593883bb8ad61.zip
share-7c0b9a4841b0713f63857584ecb593883bb8ad61.tar.gz
u2f_connector.js : fix u2f js calls, supports chrome
-rw-r--r--java/vaadin-u2f/src/main/java/ch/asynk/security/u2f_connector.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/java/vaadin-u2f/src/main/java/ch/asynk/security/u2f_connector.js b/java/vaadin-u2f/src/main/java/ch/asynk/security/u2f_connector.js
index 8723cb3..424b0fc 100644
--- a/java/vaadin-u2f/src/main/java/ch/asynk/security/u2f_connector.js
+++ b/java/vaadin-u2f/src/main/java/ch/asynk/security/u2f_connector.js
@@ -6,25 +6,25 @@ window.ch_asynk_security_U2fConnector = function() {
var request = JSON.parse(requestJson);
// alert(JSON.stringify(request));
setTimeout(function() {
- u2f.register(request.registerRequests, request.authenticateRequests, function(data) {
+ u2f.register(request.registerRequests[0].appId, request.registerRequests, request.authenticateRequests, function(data) {
if(data.errorCode)
connector.onRegisterResponse(data.errorCode, request);
else
connector.onRegisterResponse(JSON.stringify(data));
});
- }, 500);
+ }, 5000);
}
this.authenticate = function(requestJson) {
var request = JSON.parse(requestJson);
- //alert(JSON.stringify(request));
+ // alert(JSON.stringify(request));
setTimeout(function() {
- u2f.sign(request.authenticateRequests, function(data) {
+ u2f.sign(request.authenticateRequests[0].appId, request.authenticateRequests[0].challenge, request.authenticateRequests, function(data) {
if(data.errorCode)
connector.onAuthenticateResponse(data.errorCode, request);
else
connector.onAuthenticateResponse(JSON.stringify(data));
});
- }, 500);
+ }, 5000);
}
}