public function Salesforce::getAuthorizationCode in Salesforce Suite 7.3
OAuth step 1: Redirect to Salesforce and request and authorization code.
File
- includes/
salesforce.inc, line 404 - Objects, properties, and methods to communicate with the Salesforce REST API
Class
- Salesforce
- Ability to authorize and communicate with the Salesforce REST API.
Code
public function getAuthorizationCode() {
$url = $this->login_url . '/services/oauth2/authorize';
$query = array(
'redirect_uri' => $this
->redirectUrl(),
'response_type' => 'code',
'client_id' => $this->consumer_key,
);
drupal_goto($url, array(
'query' => $query,
));
}