diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2018-10-02 19:10:11 +0300 |
---|---|---|
committer | Christoph Wurst <christoph@winzerhof-wurst.at> | 2018-10-02 19:10:11 +0300 |
commit | a3199653980741e2c08e1e5477346fc443e28ebe (patch) | |
tree | a5ab8ec4b6c15b51048315d5f9405d8a20c2c982 /lib/Provider/TotpProvider.php | |
parent | 5eb46ca8b0570545e305ce7b859ceb5004e8a231 (diff) |
Update to new 2FA settings API
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'lib/Provider/TotpProvider.php')
-rw-r--r-- | lib/Provider/TotpProvider.php | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/Provider/TotpProvider.php b/lib/Provider/TotpProvider.php index 6ae155b..bffa94b 100644 --- a/lib/Provider/TotpProvider.php +++ b/lib/Provider/TotpProvider.php @@ -1,6 +1,6 @@ <?php -declare(strict_types = 1); +declare(strict_types=1); /** * @author Christoph Wurst <christoph@winzerhof-wurst.at> @@ -24,13 +24,16 @@ declare(strict_types = 1); namespace OCA\TwoFactorTOTP\Provider; use OCA\TwoFactorTOTP\Service\ITotp; +use OCA\TwoFactorTOTP\Settings\Personal; +use OCP\Authentication\TwoFactorAuth\IPersonalProviderSettings; use OCP\Authentication\TwoFactorAuth\IProvider; use OCP\Authentication\TwoFactorAuth\IProvidesIcons; +use OCP\Authentication\TwoFactorAuth\IProvidesPersonalSettings; use OCP\IL10N; use OCP\IUser; use OCP\Template; -class TotpProvider implements IProvider, IProvidesIcons { +class TotpProvider implements IProvider, IProvidesIcons, IProvidesPersonalSettings { /** @var ITotp */ private $totp; @@ -94,4 +97,8 @@ class TotpProvider implements IProvider, IProvidesIcons { public function getDarkIcon(): String { return image_path('twofactor_totp', 'app-dark.svg'); } + + public function getPersonalSettings(IUser $user): IPersonalProviderSettings { + return new Personal(); + } } |