---
schema_version: "1"
id: 92f611a4e29e988a62bd1966bd0e24d2ee4dcb843e55b67c166793f60e3fd546
title: AuthenticationCapability Enum
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/apexref/apex_enum_DataSource_AuthenticationCapability.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_enum_DataSource_AuthenticationCapability.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: aba5ccccd202e899fd914c230edd7caa8141a52699ee212f60b5307bb926160b
description: Specifies the types of authentication that can be used to access the external system.
---
# AuthenticationCapability Enum

Specifies the types of authentication that can be used to access the external system.

## Usage

The DataSource.Provider class returns DataSource.AuthenticationCapability enum values. The returned values determine which authentication settings are available on the external data source definition in Salesforce.

If you set up callouts in your DataSource.Connection class, you can specify the callout endpoints as named credentials instead of URLs. If you do so for all callouts, return ANONYMOUS as the sole entry in the list of data source authentication capabilities. That way, the external data source definition doesn’t require authentication settings. Salesforce manages all authentication for Apex callouts that specify a named credential as the callout endpoint so that your code doesn’t have to.

## Enum Values

The following are the values of the DataSource.AuthenticationCapability enum.

| Value | Description |
| --- | --- |
| ANONYMOUS | No credentials are required to authenticate to the external system. |
| BASIC | A username and password can be used to authenticate to the external system. |
| CERTIFICATE | A security certificate can be supplied when establishing each connection to the external system. |
| OAUTH | OAuth can be used to authenticate to the external system. |