diff options
author | Morris Jobke <hey@morrisjobke.de> | 2020-08-13 07:25:01 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-13 07:25:01 +0200 |
commit | 725fecee3454dd1fabe1b373a8c9a37f81040fd9 (patch) | |
tree | 8928539bdd919e25295ebd7b0b15ce0828b4ee75 /lib/public/Authentication | |
parent | 3a39f2ae9165fdbf98ad9fafcb52d7dde7f75df8 (diff) | |
parent | 68794ebc9292cdedaa6a52d190e41e58f6edb1ba (diff) | |
download | nextcloud-server-725fecee3454dd1fabe1b373a8c9a37f81040fd9.tar.gz nextcloud-server-725fecee3454dd1fabe1b373a8c9a37f81040fd9.zip |
Merge pull request #21344 from nextcloud/fix/twofactor-cleanup-event
Emit an event for every disabled 2FA provider during cleanup
Diffstat (limited to 'lib/public/Authentication')
-rw-r--r-- | lib/public/Authentication/TwoFactorAuth/TwoFactorProviderDisabled.php | 52 |
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; + } +} |