From 62dcd743fb8478c8c19f10e26ad3b1982a3963be Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Sun, 17 Nov 2019 21:51:24 +0100 Subject: [PATCH] webauthn --- lam/lib/2factor.inc | 3 +++ lam/templates/config/confmain.php | 6 +++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/lam/lib/2factor.inc b/lam/lib/2factor.inc index 1b2d0a3b..65619772 100644 --- a/lam/lib/2factor.inc +++ b/lam/lib/2factor.inc @@ -593,6 +593,9 @@ class TwoFactorProviderService { elseif ($this->config->twoFactorAuthentication == TwoFactorProviderService::TWO_FACTOR_DUO) { return new DuoProvider($this->config); } + elseif ($this->config->twoFactorAuthentication == TwoFactorProviderService::TWO_FACTOR_WEBAUTHN) { + return new WebauthnProvider($this->config); + } throw new \Exception('Invalid provider: ' . $this->config->twoFactorAuthentication); } diff --git a/lam/templates/config/confmain.php b/lam/templates/config/confmain.php index 6a506aeb..a927b591 100644 --- a/lam/templates/config/confmain.php +++ b/lam/templates/config/confmain.php @@ -466,6 +466,8 @@ if (extension_loaded('curl')) { 'privacyIDEA' => TwoFactorProviderService::TWO_FACTOR_PRIVACYIDEA, 'YubiKey' => TwoFactorProviderService::TWO_FACTOR_YUBICO, 'Duo' => TwoFactorProviderService::TWO_FACTOR_DUO, + 'Webauthn' => TwoFactorProviderService::TWO_FACTOR_DUO, + 'Webauthn' => TwoFactorProviderService::TWO_FACTOR_WEBAUTHN, ); $twoFactorSelect = new htmlResponsiveSelect('twoFactor', $twoFactorOptions, array($conf->getTwoFactorAuthentication()), _('Provider'), '514'); $twoFactorSelect->setHasDescriptiveElements(true); @@ -474,7 +476,9 @@ if (extension_loaded('curl')) { 'twoFactorOptional', 'twoFactorCaption', 'twoFactorClientId', 'twoFactorSecretKey', 'twoFactorAttribute'), TwoFactorProviderService::TWO_FACTOR_PRIVACYIDEA => array('twoFactorURLs', 'twoFactorClientId', 'twoFactorSecretKey'), TwoFactorProviderService::TWO_FACTOR_YUBICO => array('twoFactorURL', 'twoFactorAttribute'), - TwoFactorProviderService::TWO_FACTOR_DUO => array('twoFactorURLs', 'twoFactorOptional', 'twoFactorInsecure'), + TwoFactorProviderService::TWO_FACTOR_DUO => array('twoFactorURLs', 'twoFactorOptional', 'twoFactorInsecure', 'twoFactorLabel'), + TwoFactorProviderService::TWO_FACTOR_WEBAUTHN => array('twoFactorURL', 'twoFactorURLs', 'twoFactorInsecure', 'twoFactorLabel', + 'twoFactorOptional', 'twoFactorCaption', 'twoFactorClientId', 'twoFactorSecretKey', 'twoFactorAttribute'), )); $twoFactorSelect->setTableRowsToShow(array( TwoFactorProviderService::TWO_FACTOR_PRIVACYIDEA => array('twoFactorURL', 'twoFactorInsecure', 'twoFactorLabel',