Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@owncloud.com>2016-05-11 12:23:25 +0300
committerChristoph Wurst <christoph@owncloud.com>2016-05-23 12:21:10 +0300
commitdfb4d426c24c8cbb7e207a3dd92b5fcd894a1977 (patch)
treedc640b6bb84d032a6a45ca03ffe91e37d9c99ea9 /core/Application.php
parentdec3f9ebcbdeacf5bc483df93900b157a1a5e546 (diff)
Add two factor auth to core
Diffstat (limited to 'core/Application.php')
-rw-r--r--core/Application.php16
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();
+ });
}
}