summaryrefslogtreecommitdiffstats
path: root/lib/private/Authentication
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2016-08-02 10:34:11 +0200
committerChristoph Wurst <christoph@winzerhof-wurst.at>2016-08-02 12:08:13 +0200
commite90f00791d1b5a5d615ce194a1ccb2104f3826c1 (patch)
tree5e2f7545fbf646c785e7acc063069f3d71ff170b /lib/private/Authentication
parent5f83f4d9a8ab7c224c13e9870f6bbd78c2633d84 (diff)
downloadnextcloud-server-e90f00791d1b5a5d615ce194a1ccb2104f3826c1.tar.gz
nextcloud-server-e90f00791d1b5a5d615ce194a1ccb2104f3826c1.zip
add invalidateOldTokens to IProvider interface
Diffstat (limited to 'lib/private/Authentication')
-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