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
ConstructorDescriptionTlsConfiguration
(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 theSSLSocketFactory
to use in theHttpsURLConnection
.
-
Constructor Details
-
TlsConfiguration
public TlsConfiguration(OAuth2ClientCredentialsGrantCredentialsProvider.OAuth2ClientCredentialsGrantCredentialsProviderBuilder builder)
-
-
Method Details
-
hostnameVerifier
public OAuth2ClientCredentialsGrantCredentialsProvider.TlsConfiguration hostnameVerifier(HostnameVerifier hostnameVerifier) Set the hostname verifier.HttpsURLConnection
sets 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 theSSLSocketFactory
to use in theHttpsURLConnection
.The
SSLSocketFactory
supersedes theSSLContext
value if both are set up.- Parameters:
sslSocketFactory
-- Returns:
- this TLS configuration instance
-
sslContext
public OAuth2ClientCredentialsGrantCredentialsProvider.TlsConfiguration sslContext(SSLContext sslContext) Set theSSLContext
to use to create theSSLSocketFactory
for theHttpsURLConnection
.This is the preferred way to configure TLS version to use, trusted servers, etc.
Note the
SSLContext
is not used if theSSLSocketFactory
is 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
-