From dfb4d426c24c8cbb7e207a3dd92b5fcd894a1977 Mon Sep 17 00:00:00 2001 From: Christoph Wurst Date: Wed, 11 May 2016 11:23:25 +0200 Subject: Add two factor auth to core --- lib/private/Server.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'lib/private/Server.php') 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(); }); @@ -854,6 +859,13 @@ class Server extends ServerContainer implements IServerContainer { return $this->query('UserSession')->setSession($session); } + /** + * @return \OC\Authentication\TwoFactorAuth\Manager + */ + public function getTwoFactorAuthManager() { + return $this->query('\OC\Authentication\TwoFactorAuth\Manager'); + } + /** * @return \OC\NavigationManager */ -- cgit v1.2.3