public function getTokens($clientId, $clientSecret, $authCode, $redirectUrl)
    {
        $this->client = new HTTPClient();

        $this->client->setCustomHeader(array(
            "Authorization: Basic " . base64_encode($clientId . ":" .
                                                    $clientSecret),
        ));

        $this->client->setPostParams(array(
                "code" => urlencode($authCode),
                "client_id" => urlencode($clientId),
                "client_secret" => urlencode($clientSecret),
                "redirect_uri" => $redirectUrl,
                "grant_type" => "authorization_code"
            )
            , false);

        $response = new AccessTokenResponse(
            $this->client->post($this->apiMode->getApiBaseUrl() . $this->accessTokenPath)
        );

        $this->accessTokenStorage->store($response);

        return $response;
    }