|
@@ -183,51 +183,9 @@ function recursiveBase64StrToArrayBuffer(obj) {
|
|
});
|
|
});
|
|
|
|
|
|
|
|
|
|
- // validate Yubi OTP tfa
|
|
|
|
- $("#pending_tfa_tab_yubi_otp").click(function(){
|
|
|
|
- $(".totp-authenticator-selection").removeClass("active");
|
|
|
|
- $(".webauthn-authenticator-selection").removeClass("active");
|
|
|
|
- $("#collapseTotpTFA").collapse('hide');
|
|
|
|
- $("#collapseWebAuthnTFA").collapse('hide');
|
|
|
|
-
|
|
|
|
- // select default if only one authenticator exists
|
|
|
|
- if ($('.yubi-authenticator-selection').length == 1){
|
|
|
|
- $('.yubi-authenticator-selection').addClass("active");
|
|
|
|
- var id = $('.yubi-authenticator-selection').children('input').first().val();
|
|
|
|
- $("#yubi_selected_id").val(id);
|
|
|
|
- $("#collapseYubiTFA").collapse('show');
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
- $(".yubi-authenticator-selection").click(function(){
|
|
|
|
- $(".yubi-authenticator-selection").removeClass("active");
|
|
|
|
- $(this).addClass("active");
|
|
|
|
-
|
|
|
|
- var id = $(this).children('input').first().val();
|
|
|
|
- $("#yubi_selected_id").val(id);
|
|
|
|
-
|
|
|
|
- $("#collapseYubiTFA").collapse('show');
|
|
|
|
- $("#collapseYubiTFA").children('input[name="token"]').focus();
|
|
|
|
- });
|
|
|
|
- if ($('.yubi-authenticator-selection').length == 1 &&
|
|
|
|
- $('.webauthn-authenticator-selection').length == 0){
|
|
|
|
-
|
|
|
|
- // select default if only one authenticator exists
|
|
|
|
- $('.yubi-authenticator-selection').addClass("active");
|
|
|
|
-
|
|
|
|
- var id = $('.yubi-authenticator-selection').children('input').first().val();
|
|
|
|
- $("#yubi_selected_id").val(id);
|
|
|
|
-
|
|
|
|
- $("#collapseYubiTFA").collapse('show');
|
|
|
|
- }
|
|
|
|
- $('#collapseYubiTFA').on('shown.bs.collapse', function() {
|
|
|
|
- // autofocus
|
|
|
|
- setTimeout(function() { $("#collapseYubiTFA").find('input[name="token"]').focus(); }, 200);
|
|
|
|
- });
|
|
|
|
// validate Time based OTP tfa
|
|
// validate Time based OTP tfa
|
|
$("#pending_tfa_tab_totp").click(function(){
|
|
$("#pending_tfa_tab_totp").click(function(){
|
|
- $(".yubi-authenticator-selection").removeClass("active");
|
|
|
|
$(".webauthn-authenticator-selection").removeClass("active");
|
|
$(".webauthn-authenticator-selection").removeClass("active");
|
|
- $("#collapseYubiTFA").collapse('hide');
|
|
|
|
$("#collapseWebAuthnTFA").collapse('hide');
|
|
$("#collapseWebAuthnTFA").collapse('hide');
|
|
|
|
|
|
// select default if only one authenticator exists
|
|
// select default if only one authenticator exists
|
|
@@ -248,9 +206,9 @@ function recursiveBase64StrToArrayBuffer(obj) {
|
|
$("#collapseTotpTFA").collapse('show');
|
|
$("#collapseTotpTFA").collapse('show');
|
|
});
|
|
});
|
|
if ($('.totp-authenticator-selection').length == 1 &&
|
|
if ($('.totp-authenticator-selection').length == 1 &&
|
|
- $('.yubi-authenticator-selection').length == 0 &&
|
|
|
|
|
|
+ $('#pending_tfa_tab_yubi_otp').length == 0 &&
|
|
$('.webauthn-authenticator-selection').length == 0){
|
|
$('.webauthn-authenticator-selection').length == 0){
|
|
-
|
|
|
|
|
|
+
|
|
// select default if only one authenticator exists
|
|
// select default if only one authenticator exists
|
|
$('.totp-authenticator-selection').addClass("active");
|
|
$('.totp-authenticator-selection').addClass("active");
|
|
|
|
|
|
@@ -258,18 +216,26 @@ function recursiveBase64StrToArrayBuffer(obj) {
|
|
$("#totp_selected_id").val(id);
|
|
$("#totp_selected_id").val(id);
|
|
|
|
|
|
$("#collapseTotpTFA").collapse('show');
|
|
$("#collapseTotpTFA").collapse('show');
|
|
|
|
+ setTimeout(function() { $("#collapseTotpTFA").find('input[name="token"]').focus(); }, 1000);
|
|
}
|
|
}
|
|
- $('#collapseTotpTFA').on('shown.bs.collapse', function() {
|
|
|
|
|
|
+ $('#pending_tfa_tab_totp').on('shown.bs.tab', function() {
|
|
// autofocus
|
|
// autofocus
|
|
setTimeout(function() { $("#collapseTotpTFA").find('input[name="token"]').focus(); }, 200);
|
|
setTimeout(function() { $("#collapseTotpTFA").find('input[name="token"]').focus(); }, 200);
|
|
|
|
+ });
|
|
|
|
+ // validate Yubi OTP tfa
|
|
|
|
+ if ($('.webauthn-authenticator-selection').length == 0){
|
|
|
|
+ // autofocus
|
|
|
|
+ setTimeout(function() { $("#collapseYubiTFA").find('input[name="token"]').focus(); }, 1000);
|
|
|
|
+ }
|
|
|
|
+ $('#pending_tfa_tab_yubi_otp').on('shown.bs.tab', function() {
|
|
|
|
+ // autofocus
|
|
|
|
+ $("#collapseYubiTFA").find('input[name="token"]').focus();
|
|
});
|
|
});
|
|
// validate WebAuthn tfa
|
|
// validate WebAuthn tfa
|
|
$("#pending_tfa_tab_webauthn").click(function(){
|
|
$("#pending_tfa_tab_webauthn").click(function(){
|
|
$(".totp-authenticator-selection").removeClass("active");
|
|
$(".totp-authenticator-selection").removeClass("active");
|
|
- $(".yubi-authenticator-selection").removeClass("active");
|
|
|
|
|
|
|
|
$("#collapseTotpTFA").collapse('hide');
|
|
$("#collapseTotpTFA").collapse('hide');
|
|
- $("#collapseYubiTFA").collapse('hide');
|
|
|
|
});
|
|
});
|
|
$(".webauthn-authenticator-selection").click(function(){
|
|
$(".webauthn-authenticator-selection").click(function(){
|
|
$(".webauthn-authenticator-selection").removeClass("active");
|
|
$(".webauthn-authenticator-selection").removeClass("active");
|