public function confirmSession($token, $verifier)
    {
        if ($this->authentication->getTokenStorage()->getRequestToken() != $token) {
            throw new LogicException('The request tokens do not match.');
        }

        $response = $this->sendCustomOauthPostRequest(
            $this->config['access_url'],
            [
                'verifier' => $verifier,
                'token' => $this->authentication->getTokenStorage()->getRequestToken(),
                'token_secret' => $this->authentication->getTokenStorage()->getRequestTokenSecret(),
            ]
        );

        if (200 == $response->getStatusCode()) {
            parse_str($response->getBody(), $responseData);

            if (!isset($responseData['oauth_token'])) {
                throw new UnexpectedValueException('Oauth exchange is missing `oauth_token`.');
            } elseif (!isset($responseData['oauth_token_secret'])) {
                throw new UnexpectedValueException('Oauth exchange is missing `oauth_token_secret`.');
            }

            $this->authentication->getTokenStorage()->setAccessToken($responseData['oauth_token']);
            $this->authentication->getTokenStorage()->setAccessTokenSecret($responseData['oauth_token_secret']);
            $this->authentication->getTokenStorage()->setRequestToken(null);
            $this->authentication->getTokenStorage()->setRequestTokenSecret(null);

            $this->authentication->getTokenStorage()->save();

            // next time we should reload tokens
            $this->authentication->resetOauth();
        } else {
            throw new RuntimeException('Bad response');
        }
    }