// Generated by CoffeeScript 1.10.0

/*
LemonLDAP::NG U2F verify script
 */

(function() {
  var check;

  check = function() {
    var registeredKey;
    registeredKey = [
      {
        keyHandle: window.datas.keyHandle,
        version: window.datas.version
      }
    ];
    console.log('Key: ', registeredKey);
    return u2f.sign(window.datas.appId, window.datas.challenge, registeredKey, function(data) {
      $('#verify-data').val(JSON.stringify(data));
      return $('#verify-form').submit();
    });
  };

  $(document).ready(function() {
    return setTimeout(check, 1000);
  });

}).call(this);
