From c34a2db0632da21b511063f409cf0c785359aa6d Mon Sep 17 00:00:00 2001 From: ErickSkrauch Date: Mon, 24 Jan 2022 12:01:11 +0100 Subject: [PATCH] Add account_info permission to tokens obtained via legacy authserver API [deploy dev] --- api/components/Tokens/TokensFactory.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/components/Tokens/TokensFactory.php b/api/components/Tokens/TokensFactory.php index 3e5c3da..12e1213 100644 --- a/api/components/Tokens/TokensFactory.php +++ b/api/components/Tokens/TokensFactory.php @@ -54,7 +54,7 @@ class TokensFactory extends Component { public function createForMinecraftAccount(Account $account, string $clientToken): Token { return Yii::$app->tokens->create([ - 'scope' => $this->prepareScopes([P::MINECRAFT_SERVER_SESSION]), + 'scope' => $this->prepareScopes([P::OBTAIN_OWN_ACCOUNT_INFO, P::MINECRAFT_SERVER_SESSION]), 'ely-client-token' => new EncryptedValue($clientToken), 'sub' => $this->buildSub($account->id), 'exp' => Carbon::now()->addDays(2)->getTimestamp(),