diff options
author | Christoph Wurst <christoph@owncloud.com> | 2016-05-11 11:23:25 +0200 |
---|---|---|
committer | Christoph Wurst <christoph@owncloud.com> | 2016-05-23 11:21:10 +0200 |
commit | dfb4d426c24c8cbb7e207a3dd92b5fcd894a1977 (patch) | |
tree | dc640b6bb84d032a6a45ca03ffe91e37d9c99ea9 /lib/private/Server.php | |
parent | dec3f9ebcbdeacf5bc483df93900b157a1a5e546 (diff) | |
download | nextcloud-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.php | 12 |
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() { |