summaryrefslogtreecommitdiffstats
path: root/lib/private/Setup.php
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2021-12-01 18:41:31 +0100
committerJoas Schilling <coding@schilljs.com>2021-12-01 18:41:31 +0100
commitc0ba89ecc958574a16c8dfa322ecdade413ca277 (patch)
tree249a9c8b75bb886b10f6ee501078bdb6f88c494f /lib/private/Setup.php
parent3a1ef2b012a903ee4e08483fd47afbd6fc111ca3 (diff)
downloadnextcloud-server-c0ba89ecc958574a16c8dfa322ecdade413ca277.tar.gz
nextcloud-server-c0ba89ecc958574a16c8dfa322ecdade413ca277.zip
Remove default token which is deprecated since Nextcloud 13
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/private/Setup.php')
-rw-r--r--lib/private/Setup.php8
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/private/Setup.php b/lib/private/Setup.php
index 589bbb273c0..177ede1e292 100644
--- a/lib/private/Setup.php
+++ b/lib/private/Setup.php
@@ -52,8 +52,7 @@ use bantu\IniGetWrapper\IniGetWrapper;
use Exception;
use InvalidArgumentException;
use OC\App\AppStore\Bundles\BundleFetcher;
-use OC\Authentication\Token\DefaultTokenCleanupJob;
-use OC\Authentication\Token\DefaultTokenProvider;
+use OC\Authentication\Token\PublicKeyTokenProvider;
use OC\Log\Rotate;
use OC\Preview\BackgroundCleanupJob;
use OCP\AppFramework\Utility\ITimeFactory;
@@ -432,8 +431,8 @@ class Setup {
// The token provider requires a working db, so it's not injected on setup
/* @var $userSession User\Session */
$userSession = \OC::$server->getUserSession();
- $defaultTokenProvider = \OC::$server->query(DefaultTokenProvider::class);
- $userSession->setTokenProvider($defaultTokenProvider);
+ $provider = \OC::$server->query(PublicKeyTokenProvider::class);
+ $userSession->setTokenProvider($provider);
$userSession->login($username, $password);
$userSession->createSessionToken($request, $userSession->getUser()->getUID(), $username, $password);
@@ -451,7 +450,6 @@ class Setup {
public static function installBackgroundJobs() {
$jobList = \OC::$server->getJobList();
- $jobList->add(DefaultTokenCleanupJob::class);
$jobList->add(Rotate::class);
$jobList->add(BackgroundCleanupJob::class);
}