summaryrefslogtreecommitdiffstats
path: root/core/Controller
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@owncloud.com>2016-04-26 12:48:19 +0200
committerThomas Müller <thomas.mueller@tmit.eu>2016-05-11 13:36:46 +0200
commit8d4850218740b74faae5af637d1b1c2b3dee3c41 (patch)
treea54f2a3efc72f58fea3909a017211ac26027fbf2 /core/Controller
parent53636c73d649514fbbfeba4741f39be1725e47fd (diff)
downloadnextcloud-server-8d4850218740b74faae5af637d1b1c2b3dee3c41.tar.gz
nextcloud-server-8d4850218740b74faae5af637d1b1c2b3dee3c41.zip
Add index on 'last_activity'
add token type column and delete only temporary tokens in the background job debounce token updates; fix wrong class import
Diffstat (limited to 'core/Controller')
-rw-r--r--core/Controller/TokenController.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/core/Controller/TokenController.php b/core/Controller/TokenController.php
index 45e33e832b1..8a25ad9bb98 100644
--- a/core/Controller/TokenController.php
+++ b/core/Controller/TokenController.php
@@ -24,6 +24,7 @@ namespace OC\Core\Controller;
use OC\AppFramework\Http;
use OC\Authentication\Token\DefaultTokenProvider;
+use OC\Authentication\Token\IToken;
use OC\User\Manager;
use OCP\AppFramework\Controller;
use OCP\AppFramework\Http\Response;
@@ -49,7 +50,7 @@ class TokenController extends Controller {
* @param ISecureRandom $crypto
*/
public function __construct($appName, IRequest $request, Manager $userManager, DefaultTokenProvider $tokenProvider,
- ISecureRandom $crypto) {
+ ISecureRandom $crypto) {
parent::__construct($appName, $request);
$this->userManager = $userManager;
$this->tokenProvider = $tokenProvider;
@@ -73,7 +74,7 @@ class TokenController extends Controller {
return new Response([], Http::STATUS_UNAUTHORIZED);
}
$token = $this->secureRandom->generate(128);
- $this->tokenProvider->generateToken($token, $user, $password, $name);
+ $this->tokenProvider->generateToken($token, $user, $password, $name, IToken::PERMANENT_TOKEN);
return [
'token' => $token,
];