From: Christoph Wurst Date: Tue, 2 Aug 2016 08:34:11 +0000 (+0200) Subject: add invalidateOldTokens to IProvider interface X-Git-Tag: v11.0RC2~897^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=e90f00791d1b5a5d615ce194a1ccb2104f3826c1;p=nextcloud-server.git add invalidateOldTokens to IProvider interface --- 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 @@ -65,6 +65,11 @@ interface IProvider { */ public function invalidateTokenById(IUser $user, $id); + /** + * Invalidate (delete) old session tokens + */ + public function invalidateOldTokens(); + /** * Save the updated token *