protected function oauthTokenRequest(array $args)
    {
        $statusCode = null;
        $responseHeaders = array();
        $result = json_decode(
            $response = $this->httpRequest(
                $this->oauthTokenEndpointUrl,
                $args,
                null,
                $statusCode,
                $responseHeaders,
                true
            ),
            true
        );
        if (empty($result))
        {
            throw new DailymotionAuthException("Invalid token server response: {$response}");
        }
        elseif (isset($result['error']))
        {
            $message = isset($result['error_description']) ? $result['error_description'] : null;
            $e = new DailymotionAuthException($message);
            $e->error = $result['error'];
            throw $e;
        }
        elseif (isset($result['access_token']))
        {
            return array(
                'access_token'  => $result['access_token'],
                'expires'       => time() + $result['expires_in'],
                'refresh_token' => isset($result['refresh_token']) ? $result['refresh_token'] : null,
                'scope'         => isset($result['scope']) ? explode(chr(32), $result['scope']) : array(),
            );
        }
        else
        {
            throw new DailymotionAuthException('No access token found in the token server response');
        }
    }