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 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 a GrpcExporterBuilder, or HttpExporterBuilder instance in field called "delegate" of the instance, and set the Authenticator.
        Parameters:
        builder - export builder to modify
        authenticator - authenticator to set on builder
        Throws:
        java.lang.IllegalArgumentException - if the instance does not contain a field called "delegate" of a supported type.