Move 2fa backupscode to new registration
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
parent
5ee9e1f784
commit
a34085e1a2
|
@ -5,7 +5,7 @@
|
|||
<name>Two factor backup codes</name>
|
||||
<summary>A two-factor auth backup codes provider</summary>
|
||||
<description>A two-factor auth backup codes provider</description>
|
||||
<version>1.10.0</version>
|
||||
<version>1.10.1</version>
|
||||
<licence>agpl</licence>
|
||||
<author>Christoph Wurst</author>
|
||||
<namespace>TwoFactorBackupCodes</namespace>
|
||||
|
@ -22,10 +22,6 @@
|
|||
</post-migration>
|
||||
</repair-steps>
|
||||
|
||||
<two-factor-providers>
|
||||
<provider>OCA\TwoFactorBackupCodes\Provider\BackupCodesProvider</provider>
|
||||
</two-factor-providers>
|
||||
|
||||
<activity>
|
||||
<providers>
|
||||
<provider>OCA\TwoFactorBackupCodes\Activity\Provider</provider>
|
||||
|
|
|
@ -36,6 +36,7 @@ use OCA\TwoFactorBackupCodes\Listener\ProviderEnabled;
|
|||
use OCA\TwoFactorBackupCodes\Listener\RegistryUpdater;
|
||||
use OCA\TwoFactorBackupCodes\Listener\UserDeleted;
|
||||
use OCA\TwoFactorBackupCodes\Notifications\Notifier;
|
||||
use OCA\TwoFactorBackupCodes\Provider\BackupCodesProvider;
|
||||
use OCP\AppFramework\App;
|
||||
use OCP\AppFramework\Bootstrap\IBootContext;
|
||||
use OCP\AppFramework\Bootstrap\IBootstrap;
|
||||
|
@ -59,6 +60,9 @@ class Application extends App implements IBootstrap {
|
|||
$context->registerEventListener(IRegistry::EVENT_PROVIDER_ENABLED, ProviderEnabled::class);
|
||||
$context->registerEventListener(IRegistry::EVENT_PROVIDER_DISABLED, ProviderDisabled::class);
|
||||
$context->registerEventListener(UserDeletedEvent::class, UserDeleted::class);
|
||||
|
||||
|
||||
$context->registerTwoFactorProvider(BackupCodesProvider::class);
|
||||
}
|
||||
|
||||
public function boot(IBootContext $context): void {
|
||||
|
|
|
@ -76,7 +76,7 @@ class ProviderLoader {
|
|||
}
|
||||
}
|
||||
|
||||
$registeredProviders = $this->coordinator->getRegistrationContext()->getTwoFactorProvider();
|
||||
$registeredProviders = $this->coordinator->getRegistrationContext()->getTwoFactorProviders();
|
||||
foreach ($registeredProviders as $provider) {
|
||||
try {
|
||||
$this->loadTwoFactorApp($provider->getAppId());
|
||||
|
|
Loading…
Reference in New Issue