summaryrefslogtreecommitdiffstats
path: root/lib/private/Server.php
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@owncloud.com>2016-05-11 11:23:25 +0200
committerChristoph Wurst <christoph@owncloud.com>2016-05-23 11:21:10 +0200
commitdfb4d426c24c8cbb7e207a3dd92b5fcd894a1977 (patch)
treedc640b6bb84d032a6a45ca03ffe91e37d9c99ea9 /lib/private/Server.php
parentdec3f9ebcbdeacf5bc483df93900b157a1a5e546 (diff)
downloadnextcloud-server-dfb4d426c24c8cbb7e207a3dd92b5fcd894a1977.tar.gz
nextcloud-server-dfb4d426c24c8cbb7e207a3dd92b5fcd894a1977.zip
Add two factor auth to core
Diffstat (limited to 'lib/private/Server.php')
-rw-r--r--lib/private/Server.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/private/Server.php b/lib/private/Server.php
index 0b7b8f9e403..05945cc5c1f 100644
--- a/lib/private/Server.php
+++ b/lib/private/Server.php
@@ -275,6 +275,11 @@ class Server extends ServerContainer implements IServerContainer {
});
return $userSession;
});
+
+ $this->registerService('\OC\Authentication\TwoFactorAuth\Manager', function (Server $c) {
+ return new \OC\Authentication\TwoFactorAuth\Manager($c->getAppManager(), $c->getSession());
+ });
+
$this->registerService('NavigationManager', function ($c) {
return new \OC\NavigationManager();
});
@@ -855,6 +860,13 @@ class Server extends ServerContainer implements IServerContainer {
}
/**
+ * @return \OC\Authentication\TwoFactorAuth\Manager
+ */
+ public function getTwoFactorAuthManager() {
+ return $this->query('\OC\Authentication\TwoFactorAuth\Manager');
+ }
+
+ /**
* @return \OC\NavigationManager
*/
public function getNavigationManager() {