32 lines
732 B
JavaScript
32 lines
732 B
JavaScript
// Generated by CoffeeScript 1.9.3
|
|
|
|
/*
|
|
LemonLDAP::NG U2F verify script
|
|
*/
|
|
|
|
(function() {
|
|
var check;
|
|
|
|
check = function() {
|
|
var registeredKey, registeredKeys;
|
|
registeredKey = [
|
|
{
|
|
keyHandle: window.datas.keyHandle,
|
|
version: window.datas.version
|
|
}
|
|
];
|
|
registeredKeys = window.datas.challenges;
|
|
console.log('Key: ', registeredKeys);
|
|
return u2f.sign(window.datas.appId, window.datas.challenges, registeredKey, function(data) {
|
|
$('#verify-data').val(JSON.stringify(data));
|
|
$('#verify-challenge').val(window.datas.challenge);
|
|
return $('#verify-form').submit();
|
|
});
|
|
};
|
|
|
|
$(document).ready(function() {
|
|
return setTimeout(check, 1000);
|
|
});
|
|
|
|
}).call(this);
|