Interface Authenticator
-
public interface AuthenticatorThis 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
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.Map<java.lang.String,java.lang.String>getHeaders()Method called by the exporter to get headers to be used on a request that requires authentication.static voidsetAuthenticatorOnDelegate(java.lang.Object builder, Authenticator authenticator)Reflectively access aGrpcExporterBuilder, orHttpExporterBuilderinstance in field called "delegate" of the instance, and set theAuthenticator.
-
-
-
Method Detail
-
getHeaders
java.util.Map<java.lang.String,java.lang.String> 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
static void setAuthenticatorOnDelegate(java.lang.Object builder, Authenticator authenticator)Reflectively access aGrpcExporterBuilder, orHttpExporterBuilderinstance in field called "delegate" of the instance, and set theAuthenticator.- Parameters:
builder- export builder to modifyauthenticator- authenticator to set on builder- Throws:
java.lang.IllegalArgumentException- if the instance does not contain a field called "delegate" of a supported type.
-
-