ConnectionParams Class
Namespace
Usage
If your extension of the DataSource.Provider class returns DataSource.AuthenticationCapability values that indicate support for authentication, the DataSource.Connection class is instantiated with a DataSource.ConnectionParams instance in the constructor.
- If Identity Type is set to Named Principal, the credentials come from the external data source definition.
- If Identity Type is set to Per
User:
- For queries and searches, the credentials are specific to the current user who invokes the query or search. The credentials come from the user’s authentication settings for the external system.
- For administrative connections, such as syncing the external system’s schema, the credentials come from the external data source definition.
The values in this class can appear in debug logs and can be accessed by users who have the “Author Apex” permission. If you require better security, we recommend that you specify named credentials instead of URLs as your Apex callout endpoints. Salesforce manages all authentication for Apex callouts that specify a named credential as the callout endpoint so that your code doesn’t have to.
ConnectionParams Properties
The following are properties for ConnectionParams.
password
Signature
public String password {get; set;}
Property Value
Type: String
- If Identity Type is set to Named Principal, the credentials come from the external data source definition.
- If Identity Type is set to Per User:
- For queries and searches, the credentials are specific to the current user who invokes the query or search. The credentials come from the user’s authentication settings for the external system.
- For administrative connections, such as syncing the external system’s schema, the credentials come from the external data source definition.
principalType
Signature
public DataSource.IdentityType principalType {get; set;}
Property Value
Type: DataSource.IdentityType
username
Signature
public String username {get; set;}
Property Value
Type: String
- If Identity Type is set to Named Principal, the credentials come from the external data source definition.
- If Identity Type is set to Per User:
- For queries and searches, the credentials are specific to the current user who invokes the query or search. The credentials come from the user’s authentication settings for the external system.
- For administrative connections, such as syncing the external system’s schema, the credentials come from the external data source definition.