add invalidateOldTokens to IProvider interface
This commit is contained in:
parent
5f83f4d9a8
commit
e90f00791d
2 changed files with 7 additions and 3 deletions
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
@ -65,6 +65,11 @@ interface IProvider {
|
|||
*/
|
||||
public function invalidateTokenById(IUser $user, $id);
|
||||
|
||||
/**
|
||||
* Invalidate (delete) old session tokens
|
||||
*/
|
||||
public function invalidateOldTokens();
|
||||
|
||||
/**
|
||||
* Save the updated token
|
||||
*
|
||||
|
|
Loading…
Reference in a new issue