add translated unavailable message because of non https mode

This commit is contained in:
Daniel Seifert 2022-10-27 14:52:20 +02:00
parent e6039886ea
commit bdca344fe5
Signed by: DanielS
GPG Key ID: 8A7C4C6ED1915C6F
5 changed files with 16 additions and 1 deletions

View File

@ -45,6 +45,8 @@ class d3_account_webauthn extends AccountController
$this->addTplParam('user', $this->getUser());
$this->addTplParam('readonly', (bool) !(oxNew(Webauthn::class)->isAvailable()));
return $sRet;
}

View File

@ -34,7 +34,10 @@ class Webauthn
return true;
}
Registry::getUtilsView()->addErrorToDisplay('WebAuthn is available on secure connections only.');
Registry::getUtilsView()->addErrorToDisplay(
Registry::getLang()->translateString('D3_WEBAUTHN_ERR_UNSECURECONNECTION', null, true)
);
return false;
}

View File

@ -31,6 +31,8 @@ $aLang = [
'D3_WEBAUTHN_ADDKEY' => 'Sicherheitsschlüssel hinzufügen',
'D3_WEBAUTHN_REGISTEREDKEYS' => 'registrierte Schlüssel',
'D3_WEBAUTHN_ERR_UNSECURECONNECTION' => 'Die Verwendung von Sicherheitsschlüsseln ist nur bei gesicherten Verbindungen (https) möglich.',
/*
'D3_TOTP_QRCODE' => 'QR-Code',
'D3_TOTP_QRCODE_HELP' => 'Scannen Sie diesen QR-Code mit Ihrer Authentisierungs-App, um dieses Benutzerkonto dort zu hinterlegen.',

View File

@ -31,6 +31,8 @@ $aLang = [
'D3_WEBAUTHN_ADDKEY' => 'add security key',
'D3_WEBAUTHN_REGISTEREDKEYS' => 'registered keys',
'D3_WEBAUTHN_ERR_UNSECURECONNECTION' => 'The use of security keys is only possible with secured connections (https).',
/*
'D3_TOTP_QRCODE' => 'QR-Code',
'D3_TOTP_QRCODE_HELP' => 'Scannen Sie diesen QR-Code mit Ihrer Authentisierungs-App, um dieses Benutzerkonto dort zu hinterlegen.',

View File

@ -11,6 +11,12 @@
[{/capture}]
[{oxscript add=$smarty.capture.javascripts}]
[{if $readonly}]
[{assign var="readonly" value="readonly disabled"}]
[{else}]
[{assign var="readonly" value=""}]
[{/if}]
<h1 class="page-header">[{oxmultilang ident="D3_WEBAUTHN_ACCOUNT"}]</h1>
<style>