Make 2FA providers stateful
This adds persistence to the Nextcloud server 2FA logic so that the server
knows which 2FA providers are enabled for a specific user at any time, even
when the provider is not available.
The `IStatefulProvider` interface was added as tagging interface for providers
that are compatible with this new API.
Signed-off-by:
Christoph Wurst <christoph@winzerhof-wurst.at>
Showing
- core/Command/TwoFactorAuth/State.php 110 additions, 0 deletionscore/Command/TwoFactorAuth/State.php
- core/Controller/LoginController.php 1 addition, 1 deletioncore/Controller/LoginController.php
- core/Controller/TwoFactorChallengeController.php 25 additions, 4 deletionscore/Controller/TwoFactorChallengeController.php
- core/Migrations/Version14000Date20180522074438.php 62 additions, 0 deletionscore/Migrations/Version14000Date20180522074438.php
- core/register_command.php 1 addition, 0 deletionscore/register_command.php
- core/templates/twofactorselectchallenge.php 5 additions, 0 deletionscore/templates/twofactorselectchallenge.php
- lib/composer/composer/autoload_classmap.php 7 additions, 0 deletionslib/composer/composer/autoload_classmap.php
- lib/composer/composer/autoload_static.php 7 additions, 0 deletionslib/composer/composer/autoload_static.php
- lib/private/Authentication/TwoFactorAuth/Db/ProviderUserAssignmentDao.php 86 additions, 0 deletions...entication/TwoFactorAuth/Db/ProviderUserAssignmentDao.php
- lib/private/Authentication/TwoFactorAuth/Manager.php 91 additions, 72 deletionslib/private/Authentication/TwoFactorAuth/Manager.php
- lib/private/Authentication/TwoFactorAuth/ProviderLoader.php 88 additions, 0 deletionslib/private/Authentication/TwoFactorAuth/ProviderLoader.php
- lib/private/Authentication/TwoFactorAuth/ProviderSet.php 71 additions, 0 deletionslib/private/Authentication/TwoFactorAuth/ProviderSet.php
- lib/private/Authentication/TwoFactorAuth/Registry.php 55 additions, 0 deletionslib/private/Authentication/TwoFactorAuth/Registry.php
- lib/private/Server.php 1 addition, 12 deletionslib/private/Server.php
- lib/public/Authentication/TwoFactorAuth/IRegistry.php 65 additions, 0 deletionslib/public/Authentication/TwoFactorAuth/IRegistry.php
- tests/Core/Controller/LoginControllerTest.php 17 additions, 15 deletionstests/Core/Controller/LoginControllerTest.php
- tests/Core/Controller/TwoFactorChallengeControllerTest.php 22 additions, 21 deletionstests/Core/Controller/TwoFactorChallengeControllerTest.php
- tests/lib/Authentication/TwoFactorAuth/Db/ProviderUserAssignmentDaoTest.php 95 additions, 0 deletions...cation/TwoFactorAuth/Db/ProviderUserAssignmentDaoTest.php
- tests/lib/Authentication/TwoFactorAuth/ManagerTest.php 111 additions, 136 deletionstests/lib/Authentication/TwoFactorAuth/ManagerTest.php
- tests/lib/Authentication/TwoFactorAuth/ProviderLoaderTest.php 86 additions, 0 deletions...s/lib/Authentication/TwoFactorAuth/ProviderLoaderTest.php
Loading
Please register or sign in to comment