summaryrefslogtreecommitdiffstats
path: root/core/Application.php
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@owncloud.com>2016-04-26 12:45:08 +0200
committerThomas Müller <thomas.mueller@tmit.eu>2016-05-11 13:36:46 +0200
commit53636c73d649514fbbfeba4741f39be1725e47fd (patch)
tree68c783886304248a2e1f0ce20b5e855fa74d8f64 /core/Application.php
parent3ab922601a2e6b9b170007461b9e0718c70bddcd (diff)
downloadnextcloud-server-53636c73d649514fbbfeba4741f39be1725e47fd.tar.gz
nextcloud-server-53636c73d649514fbbfeba4741f39be1725e47fd.zip
Add controller to generate client tokens
Diffstat (limited to 'core/Application.php')
-rw-r--r--core/Application.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/core/Application.php b/core/Application.php
index faadad32989..a835dc7fbb2 100644
--- a/core/Application.php
+++ b/core/Application.php
@@ -32,6 +32,7 @@ use OC\AppFramework\Utility\TimeFactory;
use OC\Core\Controller\AvatarController;
use OC\Core\Controller\LoginController;
use OC\Core\Controller\LostController;
+use OC\Core\Controller\TokenController;
use OC\Core\Controller\UserController;
use OC_Defaults;
use OCP\AppFramework\App;
@@ -103,6 +104,15 @@ class Application extends App {
$c->query('URLGenerator')
);
});
+ $container->registerService('TokenController', function(SimpleContainer $c) {
+ return new TokenController(
+ $c->query('AppName'),
+ $c->query('Request'),
+ $c->query('UserManager'),
+ $c->query('OC\Authentication\Token\DefaultTokenProvider'),
+ $c->query('SecureRandom')
+ );
+ });
/**
* Core class wrappers