Class MtlsHttpTransportFactory

java.lang.Object
com.google.auth.mtls.MtlsHttpTransportFactory
All Implemented Interfaces:
HttpTransportFactory

@InternalApi public class MtlsHttpTransportFactory extends Object implements HttpTransportFactory
An HttpTransportFactory that creates NetHttpTransport instances configured for mTLS (mutual TLS) using a specific KeyStore containing the client's certificate and private key.

Warning: This class is considered internal and is not intended for direct use by library consumers. Its API and behavior may change without notice.

  • Constructor Details

    • MtlsHttpTransportFactory

      public MtlsHttpTransportFactory(KeyStore mtlsKeyStore)
      Constructs a factory for mTLS transports.
      Parameters:
      mtlsKeyStore - The KeyStore containing the client's X509 certificate and private key. This KeyStore is used for client authentication during the TLS handshake. Must not be null.
  • Method Details

    • create

      public com.google.api.client.http.javanet.NetHttpTransport create()
      Description copied from interface: HttpTransportFactory
      Creates a HttpTransport instance.
      Specified by:
      create in interface HttpTransportFactory
      Returns:
      The HttpTransport instance.