protected function createAccessTokenFromRefreshToken(Token $refreshToken)
    {
        $logger = $this->getLogger();
        $logger->debug('Starting request to create fresh access token from refresh token');

        $body = [
            'client_id' => 'anonymous',
            'grant_type' => 'refresh_token',
            'refresh_token' => $refreshToken->getTokenString(),
        ];

        $response = $this->sendPostRequest($body);

        $logger->debug('Successfully retrieved new access token', $response);

        return new Token(
            $response['access_token'],
            $this->tokenExtractor->extract($response['access_token'])
        );
    }
protected function createAccessTokenFromRefreshToken(Token $refreshToken)
    {
        $logger = $this->getLogger();
        $logger->debug('Starting request to create fresh access token from refresh token');

        $body = [
            'client_id' => 'anonymous',
            'grant_type' => 'refresh_token',
            'refresh_token' => $refreshToken->getTokenString(),
        ];

        $response = $this->sendPostRequest($body);

        $logger->debug('Successfully retrieved new access token', $response);

        return new Token(
            $response['access_token'],
            $this->tokenExtractor->extract($response['access_token'])
        );
    }
protected function createAccessTokenFromRefreshToken ( Token $ refreshToken ) { $ logger = $ this -> getLogger ( ) ; $ logger -> debug ( 'Starting request to create fresh access token from refresh token' ) ; $ body = [ 'client_id' => 'anonymous' , 'grant_type' => 'refresh_token' , 'refresh_token' => $ refreshToken -> getTokenString ( ) , ] ; $ response = $ this -> sendPostRequest ( $ body ) ; $ logger -> debug ( 'Successfully retrieved new access token' , $ response ) ; return new Token ( $ response [ 'access_token' ] , $ this -> tokenExtractor -> extract ( $ response [ 'access_token' ] ) ) ; }
Create a new access token for a video manager using a refresh token.

@param Token $refreshToken

@return Token
Create a new access token for a video manager using a refresh token .