add invalidateOldTokens to IProvider interface

This commit is contained in:
Christoph Wurst 2016-08-02 10:34:11 +02:00
parent 5f83f4d9a8
commit e90f00791d
2 changed files with 7 additions and 3 deletions

View 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();
}

View 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
*