A provider that supplies authentication headers for Elasticsearch/OpenSearch requests.
Remarks
This interface allows for dynamic authentication mechanisms such as bearer tokens
that need to be refreshed or rotated. The getAuthHeaders method is called before
each request to the Elasticsearch/OpenSearch cluster, allowing for just-in-time
token retrieval and automatic rotation.
Returns authentication headers to be included in requests to Elasticsearch/OpenSearch.
Returns Promise<Record<string,string>>
A promise that resolves to a record of header names and values
Remarks
This method is called before each request, allowing for dynamic token refresh
and rotation. Implementations should handle caching internally if needed to
avoid excessive token generation.
A provider that supplies authentication headers for Elasticsearch/OpenSearch requests.
Remarks
This interface allows for dynamic authentication mechanisms such as bearer tokens that need to be refreshed or rotated. The
getAuthHeadersmethod is called before each request to the Elasticsearch/OpenSearch cluster, allowing for just-in-time token retrieval and automatic rotation.Example