Newer Version Available
Callouts for Salesforce Connect Custom Adapters
Authentication parameters are encapsulated in a ConnectionParams object and provided to your DataSource.Connection class’s constructor.
Named Credentials as Callout Endpoints for Salesforce Connect Custom Adapters
A Salesforce Connect custom adapter obtains the relevant credentials that are stored in Salesforce whenever they’re needed. However, your Apex code must apply those credentials to all callouts, except those that specify named credentials as the callout endpoints. A named credential lets Salesforce handle the authentication logic for you so that your code doesn’t have to.
If all your custom adapter’s callouts use named credentials, you can set the external data source’s Authentication Protocol field to No Authentication. The named credentials add the appropriate certificates and can add standard authorization headers to the callouts. You also don’t need to define a remote site for an Apex callout endpoint that’s defined as a named credential.