Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/twofactor_totp.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2018-10-02 00:43:23 +0300
committerChristoph Wurst <christoph@winzerhof-wurst.at>2018-10-02 00:43:23 +0300
commit5eb46ca8b0570545e305ce7b859ceb5004e8a231 (patch)
treed733f3f87af3322b28843c0b93b5fb0cc16d718e /lib
parent1741e848e320a74386caaae41f7ef75484085a64 (diff)
Implement icons API
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'lib')
-rw-r--r--lib/Provider/TotpProvider.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/Provider/TotpProvider.php b/lib/Provider/TotpProvider.php
index eb24fb8..6ae155b 100644
--- a/lib/Provider/TotpProvider.php
+++ b/lib/Provider/TotpProvider.php
@@ -25,11 +25,12 @@ namespace OCA\TwoFactorTOTP\Provider;
use OCA\TwoFactorTOTP\Service\ITotp;
use OCP\Authentication\TwoFactorAuth\IProvider;
+use OCP\Authentication\TwoFactorAuth\IProvidesIcons;
use OCP\IL10N;
use OCP\IUser;
use OCP\Template;
-class TotpProvider implements IProvider {
+class TotpProvider implements IProvider, IProvidesIcons {
/** @var ITotp */
private $totp;
@@ -86,4 +87,11 @@ class TotpProvider implements IProvider {
return $this->totp->hasSecret($user);
}
+ public function getLightIcon(): String {
+ return image_path('twofactor_totp', 'app.svg');
+ }
+
+ public function getDarkIcon(): String {
+ return image_path('twofactor_totp', 'app-dark.svg');
+ }
}