class for Salesforce.com REST connections; returns SalesforceRestClient::SalesforceRestClient objects
More...
#include <SalesforceRestClient.qm.dox.h>
|
const | ConnectionScheme = ... |
| Connection entry info.
|
|
const | OAuth2AuthRequestOptions = ... |
| options required to support the OAuth2 authorization code grant flow
|
|
const | OAuth2DifferentOptionMap = map {$1.value: $1.key} |
| Different OAuth2 option map; standard name => extern name.
|
|
const | OAuth2Options = ... |
| Maps Salesforce REST options to standard options.
|
|
const | OAuth2StandardToSalesforceOptionMap = map {$1.value: $1.key} |
| Maps standard option names to Salesforce REST option names.
|
|
|
| checkAuthCodeFeature () |
| Sets the auth code feature if supported.
|
|
hash< ConnectionSchemeInfo > | getConnectionSchemeInfoImpl () |
| Returns the ConnectionSchemeInfo hash for this object.
|
|
SalesforceRestClient | getImpl (bool connect=True, *hash< auto > rtopts) |
| returns a SalesforceRestClient::SalesforceRestClient object
|
|
*string | getPingPath () |
| Returns the ping path from the ping_path option.
|
|
*hash< auto > | processOAuth2TokenResponseImpl (hash< auto > resp) |
| Processes OAuth2 login responses and returns updated options.
|
|
| setChildCapabilities () |
| Sets child data provider capabilities.
|
|
class for Salesforce.com REST connections; returns SalesforceRestClient::SalesforceRestClient objects
In addition to all options supported by RestClientConnection, this connection class supports the following options:
api:
the Salesforce.com API to use; use "auto"
(the default) to use the latest API version
client_id:
(required) the Salesforce.com "consumer key" for the Connected App
client_secret:
(required) the Salesforce.com "consumer secret" for the Connected App
oauth_url_auth:
default value "https://login.salesforce.com/services/oauth2/authorize"
oauth_url_token:
default value "https://login.salesforce.com/services/oauth2/token"
(used for logging in to Salesforce.com)
oauth_url_revoke:
default value "https://login.salesforce.com/services/oauth2/revoke"
- See also
- SalesforceRestClient::constructor() for more information on the above options
- Since
- SalesforceRestConnection 1.1
◆ constructor() [1/2]
SalesforceRestClient::SalesforceRestConnection::constructor |
( |
hash< auto > |
config, |
|
|
*hash< auto > |
attr |
|
) |
| |
creates the SalesforceRestConnection connection object
- Parameters
-
config | with the following keys:
- name (required string): the connection name
- display_name (optional string): the display name
- short_desc (optional string): a short description in plain text
- desc (optional string): a long description with markdown formatting
- url (required string): the connection URL
- opts (optional hash): connection options
- logger (optional LoggerInterface object): logger for the connection
|
attr | optional connection attributes
- monitor (optional bool): should the connection be monitored? Default: True
- enabled (optional bool): is the connection enabled? Default: True
- locked (optional bool): is the connection locked? Default: False
- debug_data (optional bool): debug data? Default: False
- tags (optional hash): tags for the connection; no default value
|
- Exceptions
-
CONNECTION-OPTION-ERROR | missing or invalid connection option or attribute |
◆ constructor() [2/2]
SalesforceRestClient::SalesforceRestConnection::constructor |
( |
string |
name, |
|
|
string |
description, |
|
|
string |
url, |
|
|
hash< auto > |
attributes = {} , |
|
|
hash< auto > |
options = {} |
|
) |
| |
creates the SalesforceRestConnection connection object
- Parameters
-
name | the name of the connection |
description | connection description |
url | connection URL (potentially with password info) |
attributes | various attributes. See below |
options | connection options |
See AbstractConnection::constructor() for attributes
and options
reference.
◆ getDataProvider()
returns a data provider object for this connection
- Parameters
-
constructor_options | any additional constructor options for the data provider |
- Returns
- a data provider object for this connection
- Exceptions
-
DATA-PROVIDER-ERROR | this object does not support the data provider API |
◆ getImpl()
SalesforceRestClient SalesforceRestClient::SalesforceRestConnection::getImpl |
( |
bool |
connect = True , |
|
|
*hash< auto > |
rtopts |
|
) |
| |
|
private |
◆ getOAuth2AuthHeaders()
*hash< auto > SalesforceRestClient::SalesforceRestConnection::getOAuth2AuthHeaders |
( |
| ) |
|
Returns headers to use with OAuth2 authorization / token requests.
- Since
- SalesforceRestClient 2.0.1
◆ getOAuth2OptionName()
string SalesforceRestClient::SalesforceRestConnection::getOAuth2OptionName |
( |
string |
opt | ) |
|
Returns the OAuth2 option name for this connection.
- Since
- SalesforceRestClient 2.0
◆ getOAuth2Options()
hash< auto > SalesforceRestClient::SalesforceRestConnection::getOAuth2Options |
( |
| ) |
|
Returns OAuth2 options in a standard format.
- Since
- SalesforceRestClient 2.0
◆ hasDataProvider()
bool SalesforceRestClient::SalesforceRestConnection::hasDataProvider |
( |
| ) |
|
◆ startPollConnect()
Called to start a non-blocking polling ping operation on the remote REST server.
- Returns
- a socket poll operation object that will allow the connection goal to be reached with polling
- See also
- supportsPollingApi()