diff --git a/api/components/OAuth2/Storage/ScopeStorage.php b/api/components/OAuth2/Storage/ScopeStorage.php index 85be563..89e5981 100644 --- a/api/components/OAuth2/Storage/ScopeStorage.php +++ b/api/components/OAuth2/Storage/ScopeStorage.php @@ -12,6 +12,8 @@ class ScopeStorage extends AbstractStorage implements ScopeInterface { public const OFFLINE_ACCESS = 'offline_access'; + public const CHANGE_SKIN = 'change_skin'; + private const PUBLIC_SCOPES_TO_INTERNAL_PERMISSIONS = [ 'account_info' => P::OBTAIN_OWN_ACCOUNT_INFO, 'account_email' => P::OBTAIN_ACCOUNT_EMAIL, @@ -24,6 +26,7 @@ class ScopeStorage extends AbstractStorage implements ScopeInterface { P::OBTAIN_ACCOUNT_EMAIL, P::MINECRAFT_SERVER_SESSION, self::OFFLINE_ACCESS, + self::CHANGE_SKIN, ]; private const CLIENT_CREDENTIALS_PERMISSIONS = [ diff --git a/api/tests/functional/_steps/OauthSteps.php b/api/tests/functional/_steps/OauthSteps.php index da3b9a6..5a053bc 100644 --- a/api/tests/functional/_steps/OauthSteps.php +++ b/api/tests/functional/_steps/OauthSteps.php @@ -31,7 +31,7 @@ class OauthSteps extends FunctionalTester { } public function getRefreshToken(array $permissions = []) { - $authCode = $this->getAuthCode(array_merge([S::OFFLINE_ACCESS], $permissions)); + $authCode = $this->getAuthCode(array_merge([S::OFFLINE_ACCESS, S::CHANGE_SKIN], $permissions)); $response = $this->issueToken($authCode); return $response['refresh_token']; diff --git a/api/tests/functional/oauth/RefreshTokenCest.php b/api/tests/functional/oauth/RefreshTokenCest.php index 6bc4051..0b4c40b 100644 --- a/api/tests/functional/oauth/RefreshTokenCest.php +++ b/api/tests/functional/oauth/RefreshTokenCest.php @@ -46,7 +46,7 @@ class RefreshTokenCest { $refreshToken, 'ely', 'ZuM1vGchJz-9_UZ5HC3H3Z9Hg5PzdbkM', - [P::MINECRAFT_SERVER_SESSION, S::OFFLINE_ACCESS] + [P::MINECRAFT_SERVER_SESSION, S::OFFLINE_ACCESS, S::CHANGE_SKIN] )); $this->canSeeRefreshTokenSuccess($I); }