From 82bb3674fdb278c3369a73bb9ee995b6477ed9e5 Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Sat, 11 Feb 2017 19:54:57 +0100 Subject: [PATCH] get config for admin interface --- lam/lib/2factor.inc | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/lam/lib/2factor.inc b/lam/lib/2factor.inc index d05e8c6b..75a20681 100644 --- a/lam/lib/2factor.inc +++ b/lam/lib/2factor.inc @@ -278,6 +278,23 @@ class TwoFactorProviderService { return $config; } + /** + * Returns the configuration for admin interface. + * + * @param LAMConfig $conf configuration + * @return TwoFactorConfiguration configuration + */ + private function getConfigAdmin($conf) { + $config = new TwoFactorConfiguration(); + $config->twoFactorAuthentication = $conf->getTwoFactorAuthentication(); + $config->twoFactorAuthenticationCaption = $conf->getTwoFactorAuthenticationCaption(); + $config->twoFactorAuthenticationInsecure = $conf->getTwoFactorAuthenticationInsecure(); + $config->twoFactorAuthenticationLabel = $conf->getTwoFactorAuthenticationLabel(); + $config->twoFactorAuthenticationOptional = $conf->getTwoFactorAuthenticationOptional(); + $config->twoFactorAuthenticationURL = $conf->getTwoFactorAuthenticationURL(); + return $config; + } + } /**