Package com.rabbitmq.client.impl
Class OAuth2ClientCredentialsGrantCredentialsProvider.TlsConfiguration
java.lang.Object
com.rabbitmq.client.impl.OAuth2ClientCredentialsGrantCredentialsProvider.TlsConfiguration
- Enclosing class:
OAuth2ClientCredentialsGrantCredentialsProvider
TLS configuration for a
OAuth2ClientCredentialsGrantCredentialsProvider.
Use it from OAuth2ClientCredentialsGrantCredentialsProvider.OAuth2ClientCredentialsGrantCredentialsProviderBuilder.tls().
-
Constructor Summary
ConstructorsConstructorDescriptionTlsConfiguration(OAuth2ClientCredentialsGrantCredentialsProvider.OAuth2ClientCredentialsGrantCredentialsProviderBuilder builder) -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Go back to the builder to configure non-TLS settings.dev()Set up a non-secured environment, useful for development and testing.hostnameVerifier(HostnameVerifier hostnameVerifier) Set the hostname verifier.sslContext(SSLContext sslContext) sslSocketFactory(SSLSocketFactory sslSocketFactory) Set theSSLSocketFactoryto use in theHttpsURLConnection.
-
Constructor Details
-
TlsConfiguration
public TlsConfiguration(OAuth2ClientCredentialsGrantCredentialsProvider.OAuth2ClientCredentialsGrantCredentialsProviderBuilder builder)
-
-
Method Details
-
hostnameVerifier
public OAuth2ClientCredentialsGrantCredentialsProvider.TlsConfiguration hostnameVerifier(HostnameVerifier hostnameVerifier) Set the hostname verifier.HttpsURLConnectionsets a default hostname verifier, so setting a custom one is only needed for specific cases.- Parameters:
hostnameVerifier-- Returns:
- this TLS configuration instance
- See Also:
-
sslSocketFactory
public OAuth2ClientCredentialsGrantCredentialsProvider.TlsConfiguration sslSocketFactory(SSLSocketFactory sslSocketFactory) Set theSSLSocketFactoryto use in theHttpsURLConnection.The
SSLSocketFactorysupersedes theSSLContextvalue if both are set up.- Parameters:
sslSocketFactory-- Returns:
- this TLS configuration instance
-
sslContext
public OAuth2ClientCredentialsGrantCredentialsProvider.TlsConfiguration sslContext(SSLContext sslContext) Set theSSLContextto use to create theSSLSocketFactoryfor theHttpsURLConnection.This is the preferred way to configure TLS version to use, trusted servers, etc.
Note the
SSLContextis not used if theSSLSocketFactoryis set.- Parameters:
sslContext-- Returns:
- this TLS configuration instances
-
dev
Set up a non-secured environment, useful for development and testing.With this configuration, all servers are trusted. DO NOT USE this in production.
- Returns:
- a TLS configuration that trusts all servers
-
builder
public OAuth2ClientCredentialsGrantCredentialsProvider.OAuth2ClientCredentialsGrantCredentialsProviderBuilder builder()Go back to the builder to configure non-TLS settings.- Returns:
- the wrapping builder
-