summaryrefslogtreecommitdiffstats
path: root/lib/private
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private')
-rw-r--r--lib/private/Authentication/Token/DefaultTokenCleanupJob.php5
-rw-r--r--lib/private/Authentication/Token/IProvider.php5
2 files changed, 7 insertions, 3 deletions
diff --git a/lib/private/Authentication/Token/DefaultTokenCleanupJob.php b/lib/private/Authentication/Token/DefaultTokenCleanupJob.php
index a0af822d986..389a25a9bba 100644
--- a/lib/private/Authentication/Token/DefaultTokenCleanupJob.php
+++ b/lib/private/Authentication/Token/DefaultTokenCleanupJob.php
@@ -28,9 +28,8 @@ use OC\BackgroundJob\Job;
class DefaultTokenCleanupJob extends Job {
protected function run($argument) {
- /* @var $provider DefaultTokenProvider */
- // TODO: add OC\Authentication\Token\IProvider::invalidateOldTokens and query interface
- $provider = OC::$server->query('OC\Authentication\Token\DefaultTokenProvider');
+ /* @var $provider IProvider */
+ $provider = OC::$server->query('OC\Authentication\Token\IProvider');
$provider->invalidateOldTokens();
}
diff --git a/lib/private/Authentication/Token/IProvider.php b/lib/private/Authentication/Token/IProvider.php
index 4fb2830c3ac..65b515960ea 100644
--- a/lib/private/Authentication/Token/IProvider.php
+++ b/lib/private/Authentication/Token/IProvider.php
@@ -66,6 +66,11 @@ interface IProvider {
public function invalidateTokenById(IUser $user, $id);
/**
+ * Invalidate (delete) old session tokens
+ */
+ public function invalidateOldTokens();
+
+ /**
* Save the updated token
*
* @param IToken $token