fido2 authentication page
--%>
<%@page import="org.owasp.encoder.Encode" %>
-<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
+<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@include file="localize.jsp" %>
<%@include file="init-url.jsp" %>
publicKey: decodePublicKeyCredentialRequestOptions(jsonAuthRequest.publicKeyCredentialRequestOptions),
})
.then(function(data) {
- console.log(data);
payload = {};
payload.requestId = jsonAuthRequest.requestId;
payload.credential = responseToObject(data);
form.submit();
})
.catch(function(err) {
- console.log(err);
+ var form = document.getElementById('form');
+ var reg = document.getElementById('tokenResponse');
+ reg.value = JSON.stringify({errorCode : 400, message : err});
+ form.submit();
});
}
