Package com.google.auth.mtls
Class DefaultMtlsProviderFactory
java.lang.Object
com.google.auth.mtls.DefaultMtlsProviderFactory
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic MtlsProvidercreate()Creates an instance ofMtlsProvider.
-
Constructor Details
-
DefaultMtlsProviderFactory
public DefaultMtlsProviderFactory()
-
-
Method Details
-
create
Creates an instance ofMtlsProvider. It first attempts to create anX509Provider. If the certificate source is unavailable, it falls back to creating aSecureConnectProvider. If the secure connect provider also fails, it throws aCertificateSourceUnavailableException.This is only meant to be used internally by Google Cloud libraries, and the public facing methods may be changed without notice, and have no guarantee of backwards compatibility.
- Returns:
- an instance of
MtlsProvider. - Throws:
CertificateSourceUnavailableException- if neither provider can be created.IOException- if an I/O error occurs during provider creation.
-