Commit bb29ccf2 authored by Ivar Derksen's avatar Ivar Derksen
Browse files

Skip step to confirm data is going to be issued

parent e340a78c
Pipeline #43956 passed with stage
in 47 seconds
......@@ -18,7 +18,7 @@
</head>
<body>
<div class="container">
<div class="container" id="enroll-page" style="display: none;">
<div class="row">
<div id="logo" class="col-xs-12 col-md-8 col-lg-6 col-md-offset-2 col-lg-offset-3">
<hr/>
......
......@@ -30,6 +30,7 @@ getSetupFromJson(function() {
}
function irma_session_failed (msg) {
$("#enroll-page").show();
$("#enroll").prop('disabled', false);
if(msg === 'CANCELLED') {
showWarning(msg);
......@@ -38,23 +39,28 @@ getSetupFromJson(function() {
}
}
//set issuing functionality to button
$("#enroll").on("click", function() {
// Clear errors
$(".form-group").removeClass("has-error");
$("#alert_box").empty();
//disable enroll button
$("#enroll").prop('disabled', true);
irma.startSession(conf.irma_server_url, Cookies.get("jwt"), "publickey")
.then(({sessionPtr, token}) => irma.handleSession(sessionPtr, {...irma_server_conf, token}))
.then(() => {
window.location.replace(doneURL);
}, irma_session_failed);
});
$(function() {
//set issuing functionality to button
let enrollButton = $("#enroll");
enrollButton.on("click", function () {
// Clear errors
$(".form-group").removeClass("has-error");
$("#alert_box").empty();
//disable enroll button
$("#enroll").prop('disabled', true);
irma.startSession(conf.irma_server_url, Cookies.get("jwt"), "publickey")
.then(({sessionPtr, token}) => irma.handleSession(sessionPtr, {...irma_server_conf, token}))
.then(() => {
window.location.replace(doneURL);
}, irma_session_failed);
});
//decode the issuing JWT and show the values in a table
var decoded = jwt_decode(Cookies.get("jwt"));
displayAttributes(decoded.iprequest.request.credentials)
//decode the issuing JWT and show the values in a table
var decoded = jwt_decode(Cookies.get("jwt"));
displayAttributes(decoded.iprequest.request.credentials);
enrollButton.click();
});
});
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment