Optional
options: {Called by the SDK to get the authentication headers for a specific audience. The audience is a string that identifies the API endpoint that the SDK is trying to access. The SDK will use the provided headers on requests to the Camunda 8 API endpoint.
A promise that resolves to an object containing the authentication headers.
The
OAuthProvider
class is an implementation of the IHeadersProvider interface that uses the OAuth 2.0 client credentials grant to authenticate with the Camunda Platform 8 Identity service. It handles token expiration and renewal, and caches tokens in memory and on disk.It is used by the SDK to authenticate with the Camunda Platform 8. You will rarely need to use this class directly, as it is used internally by the SDK.
Example