Add account_info permission to tokens obtained via legacy authserver API [deploy dev]

This commit is contained in:
ErickSkrauch 2022-01-24 12:01:11 +01:00
parent 2bb465d867
commit c34a2db063
No known key found for this signature in database
GPG Key ID: 669339FCBB30EE0E

View File

@ -54,7 +54,7 @@ class TokensFactory extends Component {
public function createForMinecraftAccount(Account $account, string $clientToken): Token { public function createForMinecraftAccount(Account $account, string $clientToken): Token {
return Yii::$app->tokens->create([ 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), 'ely-client-token' => new EncryptedValue($clientToken),
'sub' => $this->buildSub($account->id), 'sub' => $this->buildSub($account->id),
'exp' => Carbon::now()->addDays(2)->getTimestamp(), 'exp' => Carbon::now()->addDays(2)->getTimestamp(),