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

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2020-06-09 15:33:06 +0300
committerChristoph Wurst <christoph@winzerhof-wurst.at>2020-06-16 15:38:33 +0300
commit68794ebc9292cdedaa6a52d190e41e58f6edb1ba (patch)
tree7431b26f51f615f407b000fab7ac9f68be89600e /lib/public/Authentication
parent5e52c110bb149f35ec46472a4834a5f9a25c4892 (diff)
Emit an event for every disabled 2FA provider during cleanup
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'lib/public/Authentication')
-rw-r--r--lib/public/Authentication/TwoFactorAuth/TwoFactorProviderDisabled.php52
1 files changed, 52 insertions, 0 deletions
diff --git a/lib/public/Authentication/TwoFactorAuth/TwoFactorProviderDisabled.php b/lib/public/Authentication/TwoFactorAuth/TwoFactorProviderDisabled.php
new file mode 100644
index 00000000000..a0e111c59b3
--- /dev/null
+++ b/lib/public/Authentication/TwoFactorAuth/TwoFactorProviderDisabled.php
@@ -0,0 +1,52 @@
+<?php
+
+declare(strict_types=1);
+
+/**
+ * @copyright 2020 Christoph Wurst <christoph@winzerhof-wurst.at>
+ *
+ * @author 2020 Christoph Wurst <christoph@winzerhof-wurst.at>
+ *
+ * @license GNU AGPL version 3 or any later version
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+namespace OCP\Authentication\TwoFactorAuth;
+
+use OCP\EventDispatcher\Event;
+
+/**
+ * @since 20.0.0
+ */
+final class TwoFactorProviderDisabled extends Event {
+
+ /** @var string */
+ private $providerId;
+
+ /**
+ * @since 20.0.0
+ */
+ public function __construct(string $providerId) {
+ parent::__construct();
+ $this->providerId = $providerId;
+ }
+
+ /**
+ * @since 20.0.0
+ */
+ public function getProviderId(): string {
+ return $this->providerId;
+ }
+}