Interface Authenticator
public interface Authenticator
This class is internal and is hence not for public use. Its APIs are unstable and can change at
any time.
Allow users of OTLP-OkHttp exporters to add support for authentication.
-
Method Summary
Modifier and TypeMethodDescriptionMethod called by the exporter to get headers to be used on a request that requires authentication.static void
setAuthenticatorOnDelegate
(Object builder, Authenticator authenticator) Reflectively access aGrpcExporterBuilder
, orHttpExporterBuilder
instance in field called "delegate" of the instance, and set theAuthenticator
.
-
Method Details
-
getHeaders
Method called by the exporter to get headers to be used on a request that requires authentication.- Returns:
- Headers to add to the request
-
setAuthenticatorOnDelegate
Reflectively access aGrpcExporterBuilder
, orHttpExporterBuilder
instance in field called "delegate" of the instance, and set theAuthenticator
.- Parameters:
builder
- export builder to modifyauthenticator
- authenticator to set on builder- Throws:
IllegalArgumentException
- if the instance does not contain a field called "delegate" of a supported type.
-