Your DataSource.Provider class declares what
types of credentials can be used to authenticate to the external system.
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.
The
authentication credentials in the DataSource.ConnectionParams instance depend on the Identity Type field of the external data source definition in Salesforce.
- 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.