public static class OAuth2ClientCredentialsGrantCredentialsProvider.TlsConfiguration extends Object
OAuth2ClientCredentialsGrantCredentialsProvider
.
Use it from OAuth2ClientCredentialsGrantCredentialsProvider.OAuth2ClientCredentialsGrantCredentialsProviderBuilder.tls()
.
Constructor and Description |
---|
TlsConfiguration(OAuth2ClientCredentialsGrantCredentialsProvider.OAuth2ClientCredentialsGrantCredentialsProviderBuilder builder) |
Modifier and Type | Method and Description |
---|---|
OAuth2ClientCredentialsGrantCredentialsProvider.OAuth2ClientCredentialsGrantCredentialsProviderBuilder |
builder()
Go back to the builder to configure non-TLS settings.
|
OAuth2ClientCredentialsGrantCredentialsProvider.TlsConfiguration |
dev()
Set up a non-secured environment, useful for development and testing.
|
OAuth2ClientCredentialsGrantCredentialsProvider.TlsConfiguration |
hostnameVerifier(HostnameVerifier hostnameVerifier)
Set the hostname verifier.
|
OAuth2ClientCredentialsGrantCredentialsProvider.TlsConfiguration |
sslContext(SSLContext sslContext)
|
OAuth2ClientCredentialsGrantCredentialsProvider.TlsConfiguration |
sslSocketFactory(SSLSocketFactory sslSocketFactory)
Set the
SSLSocketFactory to use in the HttpsURLConnection . |
public TlsConfiguration(OAuth2ClientCredentialsGrantCredentialsProvider.OAuth2ClientCredentialsGrantCredentialsProviderBuilder builder)
public OAuth2ClientCredentialsGrantCredentialsProvider.TlsConfiguration hostnameVerifier(HostnameVerifier hostnameVerifier)
HttpsURLConnection
sets a default hostname verifier, so
setting a custom one is only needed for specific cases.
hostnameVerifier
- HostnameVerifier
public OAuth2ClientCredentialsGrantCredentialsProvider.TlsConfiguration sslSocketFactory(SSLSocketFactory sslSocketFactory)
SSLSocketFactory
to use in the HttpsURLConnection
.
The SSLSocketFactory
supersedes the SSLContext
value if both are set up.
sslSocketFactory
- public OAuth2ClientCredentialsGrantCredentialsProvider.TlsConfiguration sslContext(SSLContext sslContext)
SSLContext
to use to create the SSLSocketFactory
for the HttpsURLConnection
.
This is the preferred way to configure TLS version to use, trusted servers, etc.
Note the SSLContext
is not used if the SSLSocketFactory
is set.
sslContext
- public OAuth2ClientCredentialsGrantCredentialsProvider.TlsConfiguration dev()
With this configuration, all servers are trusted. DO NOT USE this in production.
public OAuth2ClientCredentialsGrantCredentialsProvider.OAuth2ClientCredentialsGrantCredentialsProviderBuilder builder()
Copyright © 2022 VMware, Inc. or its affiliates.. All rights reserved.