From 68794ebc9292cdedaa6a52d190e41e58f6edb1ba Mon Sep 17 00:00:00 2001 From: Christoph Wurst Date: Tue, 9 Jun 2020 14:33:06 +0200 Subject: Emit an event for every disabled 2FA provider during cleanup Signed-off-by: Christoph Wurst --- .../TwoFactorAuth/TwoFactorProviderDisabled.php | 52 ++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 lib/public/Authentication/TwoFactorAuth/TwoFactorProviderDisabled.php (limited to 'lib/public') 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 @@ + + * + * @author 2020 Christoph Wurst + * + * @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 . + */ + +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; + } +} -- cgit v1.2.3