summaryrefslogtreecommitdiffstats
path: root/java/vaadin-u2f
diff options
context:
space:
mode:
Diffstat (limited to 'java/vaadin-u2f')
-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);
}
}