public function authenticate($username, $password, $token)
	{
		$this->_username = $username;
		$this->_password = $password;
		$this->_token = $token;

		$url = 'https://workplace.intuit.com/db/main?act=API_Authenticate';
		$action = 'API_Authenticate';

		$xml = '<?xml version="1.0" encoding="UTF-8" ?>
			<qdbapi>
				<username>' . $username . '</username>
				<password>' . $password . '</password>
				<apptoken>' . $token . '</apptoken>
			</qdbapi>';

		$Context = null;
		$response = $this->_request($Context, QuickBooks_IPP::REQUEST_IPP, $url, $action, $xml);

		if (!$this->_hasErrors($response) and
			$ticket = QuickBooks_XML::extractTagContents('ticket', $response))
		{
			$this->_ticket = $ticket;

			$cookies = array(
				'scache',
				'ptest',
				'stest',
				'luid',
				'TICKET',
				'qbn.ticket',
				'qbn.tkt',
				'qbn.authid',
				'qbn.gauthid',
				'qbn.agentid',
				'iamValidationTime'
				);

			foreach ($cookies as $cookie)
			{
				if ($value = $this->_extractCookie($cookie, $response))
				{
					$this->_cookies[$cookie] = $value;
				}
			}

			return new QuickBooks_IPP_Context($this, $ticket, $token);
		}

		return false;
	}
public function authenticate($username, $password, $token)
	{
		$this->_username = $username;
		$this->_password = $password;
		$this->_token = $token;

		$url = 'https://workplace.intuit.com/db/main?act=API_Authenticate';
		$action = 'API_Authenticate';

		$xml = '<?xml version="1.0" encoding="UTF-8" ?>
			<qdbapi>
				<username>' . $username . '</username>
				<password>' . $password . '</password>
				<apptoken>' . $token . '</apptoken>
			</qdbapi>';

		$Context = null;
		$response = $this->_request($Context, QuickBooks_IPP::REQUEST_IPP, $url, $action, $xml);

		if (!$this->_hasErrors($response) and
			$ticket = QuickBooks_XML::extractTagContents('ticket', $response))
		{
			$this->_ticket = $ticket;

			$cookies = array(
				'scache',
				'ptest',
				'stest',
				'luid',
				'TICKET',
				'qbn.ticket',
				'qbn.tkt',
				'qbn.authid',
				'qbn.gauthid',
				'qbn.agentid',
				'iamValidationTime'
				);

			foreach ($cookies as $cookie)
			{
				if ($value = $this->_extractCookie($cookie, $response))
				{
					$this->_cookies[$cookie] = $value;
				}
			}

			return new QuickBooks_IPP_Context($this, $ticket, $token);
		}

		return false;
	}
public function authenticate ( $ username , $ password , $ token ) { $ this -> _username = $ username ; $ this -> _password = $ password ; $ this -> _token = $ token ; $ url = 'https://workplace.intuit.com/db/main?act=API_Authenticate' ; $ action = 'API_Authenticate' ; $ xml = '<?xml version="1.0" encoding="UTF-8" ?>
			<qdbapi>
				<username>' . $ username . '</username>
				<password>' . $ password . '</password>
				<apptoken>' . $ token . '</apptoken>
			</qdbapi>' ; $ Context = null ; $ response = $ this -> _request ( $ Context , QuickBooks_IPP :: REQUEST_IPP , $ url , $ action , $ xml ) ; if ( ! $ this -> _hasErrors ( $ response ) and $ ticket = QuickBooks_XML :: extractTagContents ( 'ticket' , $ response ) ) { $ this -> _ticket = $ ticket ; $ cookies = array ( 'scache' , 'ptest' , 'stest' , 'luid' , 'TICKET' , 'qbn.ticket' , 'qbn.tkt' , 'qbn.authid' , 'qbn.gauthid' , 'qbn.agentid' , 'iamValidationTime' ) ; foreach ( $ cookies as $ cookie ) { if ( $ value = $ this -> _extractCookie ( $ cookie , $ response ) ) { $ this -> _cookies [ $ cookie ] = $ value ; } } return new QuickBooks_IPP_Context ( $ this , $ ticket , $ token ) ; } return false ; }
Authenticate to the IPP web service

IMPORTANT NOTE:
Intuit disallows this method within live applications! You can use it to
test your application, but when you go live you'll need to instead use
a SAML gateway for single-sign-on authentication. Take a look at the
QuickBooks_IPP_Federator class for a working SAML gateway.

@param string $username
@param string $password
@param string $token
@return boolean
Authenticate to the IPP web service