use Shopware\Core\Framework\Api\OAuth\Client\ApiClient;
use Shopware\Core\Framework\Log\Package;
#[Package('core')]
class AccessTokenRepository implements AccessTokenRepositoryInterface
{ /**
* {@inheritdoc}
*/
public function getNewToken(ClientEntityInterface
$clientEntity, array
$scopes,
$userIdentifier = null
): AccessTokenEntityInterface
{ $token =
new AccessToken($clientEntity,
$scopes,
$userIdentifier);
if ($clientEntity instanceof ApiClient &&
$clientEntity->
getIdentifier() === 'administration'
) { $token->
setIdentifier('administration'
);
} return $token;
} /**
* {@inheritdoc}
*/