]> source.dussan.org Git - nextcloud-server.git/commitdiff
add invalidateOldTokens to IProvider interface 700/head
authorChristoph Wurst <christoph@winzerhof-wurst.at>
Tue, 2 Aug 2016 08:34:11 +0000 (10:34 +0200)
committerChristoph Wurst <christoph@winzerhof-wurst.at>
Tue, 2 Aug 2016 10:08:13 +0000 (12:08 +0200)
lib/private/Authentication/Token/DefaultTokenCleanupJob.php
lib/private/Authentication/Token/IProvider.php

index a0af822d9862fff540881c6a62684416a8181b72..389a25a9bba3bf57c4bfc22c7f0a38850e8567da 100644 (file)
@@ -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();
        }
 
index 4fb2830c3acd503641956ab4eff4a861c9e531e8..65b515960ea4ed443f69de6ec356f7088ed0f216 100644 (file)
@@ -65,6 +65,11 @@ interface IProvider {
         */
        public function invalidateTokenById(IUser $user, $id);
 
+       /**
+        * Invalidate (delete) old session tokens
+        */
+       public function invalidateOldTokens();
+
        /**
         * Save the updated token
         *