diff options
Diffstat (limited to 'core/Application.php')
-rw-r--r-- | core/Application.php | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/core/Application.php b/core/Application.php index a835dc7fbb2..e00f2c906da 100644 --- a/core/Application.php +++ b/core/Application.php @@ -33,6 +33,7 @@ use OC\Core\Controller\AvatarController; use OC\Core\Controller\LoginController; use OC\Core\Controller\LostController; use OC\Core\Controller\TokenController; +use OC\Core\Controller\TwoFactorChallengeController; use OC\Core\Controller\UserController; use OC_Defaults; use OCP\AppFramework\App; @@ -101,9 +102,19 @@ class Application extends App { $c->query('Config'), $c->query('Session'), $c->query('UserSession'), - $c->query('URLGenerator') + $c->query('URLGenerator'), + $c->query('TwoFactorAuthManager') ); }); + $container->registerService('TwoFactorChallengeController', function (SimpleContainer $c) { + return new TwoFactorChallengeController( + $c->query('AppName'), + $c->query('Request'), + $c->query('TwoFactorAuthManager'), + $c->query('UserSession'), + $c->query('Session'), + $c->query('URLGenerator')); + }); $container->registerService('TokenController', function(SimpleContainer $c) { return new TokenController( $c->query('AppName'), @@ -168,6 +179,9 @@ class Application extends App { $container->registerService('DefaultEmailAddress', function() { return Util::getDefaultEmailAddress('lostpassword-noreply'); }); + $container->registerService('TwoFactorAuthManager', function(SimpleContainer $c) { + return $c->query('ServerContainer')->getTwoFactorAuthManager(); + }); } } |