play-code-live/vkplay-live-sdk

View on GitHub
src/Request/RefreshTokenRequest.php

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
<?php

declare(strict_types=1);

namespace PlayCode\VKPlayLiveSDK\Request;

class RefreshTokenRequest extends AccessTokenRequest
{
    private const GRANT_TYPE = 'refresh_token';

    public function __construct(
        private string $refreshToken,
        private string $clientId,
        private string $clientSecret,
    ) {
        parent::__construct("", $this->clientId, $this->clientSecret, "");
    }

    public function getFormParams(): array
    {
        return [
            'refresh_token' => $this->refreshToken,
            'grant_type' => self::GRANT_TYPE,
        ];
    }
}