|
|
|
|
@ -1,8 +1,10 @@
|
|
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors
|
|
|
|
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
namespace OC\Repair\Owncloud;
|
|
|
|
|
|
|
|
|
|
use OC\Authentication\Token\IProvider as ITokenProvider;
|
|
|
|
|
@ -19,21 +21,15 @@ use OCP\Security\ICrypto;
|
|
|
|
|
use OCP\Security\ISecureRandom;
|
|
|
|
|
|
|
|
|
|
class MigrateOauthTables implements IRepairStep {
|
|
|
|
|
/** @var Connection */
|
|
|
|
|
protected $db;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @param Connection $db
|
|
|
|
|
*/
|
|
|
|
|
public function __construct(
|
|
|
|
|
Connection $db,
|
|
|
|
|
protected Connection $db,
|
|
|
|
|
private AccessTokenMapper $accessTokenMapper,
|
|
|
|
|
private ITokenProvider $tokenProvider,
|
|
|
|
|
private ISecureRandom $random,
|
|
|
|
|
private ITimeFactory $timeFactory,
|
|
|
|
|
private ICrypto $crypto,
|
|
|
|
|
) {
|
|
|
|
|
$this->db = $db;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
@ -225,7 +221,7 @@ class MigrateOauthTables implements IRepairStep {
|
|
|
|
|
$row['user_id'],
|
|
|
|
|
$row['user_id'],
|
|
|
|
|
null,
|
|
|
|
|
"oc_migrated_client${clientId}_t{$now}_i$index",
|
|
|
|
|
"oc_migrated_client{$clientId}_t{$now}_i$index",
|
|
|
|
|
IToken::PERMANENT_TOKEN,
|
|
|
|
|
IToken::DO_NOT_REMEMBER,
|
|
|
|
|
);
|
|
|
|
|
|