public function connectOAuth($provider, $token, $pem_key, $encryption_key, $app_username, $app_tenant, $auth_id_pseudonym, $realm_id_pseudonym, $realm, $flavor)
	{
		if (!$this->_driver)
		{
			$this->_log('Could not connect to OAuth, no DRIVER storage instance.');
			return false;
		}
		
		$url = QuickBooks_IPP_Federator::URL_OAUTH;
		
		// First we need to push the request data into the OAuth storage
		$this->_driver->oauthRequestWrite(
			$app_username, 
			$app_tenant, 
			$auth_id_pseudonym, 
			$realm_id_pseudonym);
		
		$params = array(
			'xoauth_service_provider_id' => $provider,
			'xoauth_auth_id_pseudonym' => $auth_id_pseudonym, 
			'xoauth_realm_id_pseudonym' => $realm_id_pseudonym,
			);
		
		// Create our OAuth instance class
		$OAuth = new QuickBooks_IPP_OAuth(
			$token,		// The "consumer key" in this case is our application token 
			'');		// There is no consumer secret 
		
		$OAuth->signature(QuickBooks_IPP_OAuth::SIGNATURE_RSA, $pem_key);
		
		// Sign the request
		$sign = $OAuth->sign(QuickBooks_IPP_OAuth::METHOD_GET, $url, null, null, $params);
		
		// Now make our HTTP request to get the OAuth tokens 
		$HTTP = new QuickBooks_HTTP($sign[2]);
		
		$HTTP->useDebugMode($this->_debug);
		
		$data = $HTTP->GET();
		
		$this->_log('OAuth HTTP request: [' . $HTTP->lastRequest() . ']');
		$this->_log('OAuth HTTP response: [' . $HTTP->lastResponse() . ']');
		
		if ($data)
		{
			$tmp = array();
			parse_str($data, $tmp);
			
			if (!empty($tmp['oauth_token']) and 
				!empty($tmp['oauth_token_secret']))
			{
				// Store the OAuth tokens  
				
				$this->_log('Storing OAuth tokens...');
				
				return $this->_driver->oauthAccessWrite(
					$encryption_key, 
					$auth_id_pseudonym, 
					$tmp['oauth_token'], 
					$tmp['oauth_token_secret'], 
					$realm, 
					$flavor);
			}
		}
		
		return false;
	}