\SalesforceAuth
Contains the main Salesforce authentication logic.
Synopsis
class SalesforceAuth
{
- // constants
- const AUTH_URL = 'https://login.salesforce.com/services/oauth2/authorize';
- const CALLBACK_URL = 'https://login.salesforce.com/services/oauth2/token';
- // members
- private $clientID;
- private $clientSecret;
- // methods
- public void __construct()
- public string getClientID()
- public string getClientSecret()
- public string getAuthURL()
- public string getRedirectURL()
- public SS_HTTPResponse authenticate()
- public SS_HTTPResponse callback()
Constants
Name | Value |
---|---|
AUTH_URL | 'https://login.salesforce.com/services/oauth2/authorize' |
CALLBACK_URL | 'https://login.salesforce.com/services/oauth2/token' |
Members
private
- $clientID
- $clientSecret
Methods
public
- __construct()
- authenticate() — Returns a response to start an authentication response.
- callback() — Handles performing a callback to the Salesforce auth server with the provided authorisation code.
- getAuthURL() — Gets the URL to redirect the user to for an authentication operation.
- getClientID()
- getClientSecret()
- getRedirectURL() — Gets the application URL the user is redirected to from Salesforce.