public static class OAuth2ClientCredentialsGrantCredentialsProvider.OAuth2ClientCredentialsGrantCredentialsProviderBuilder extends Object
OAuth2ClientCredentialsGrantCredentialsProvider
instances.Constructor and Description |
---|
OAuth2ClientCredentialsGrantCredentialsProviderBuilder() |
public OAuth2ClientCredentialsGrantCredentialsProviderBuilder()
public OAuth2ClientCredentialsGrantCredentialsProvider.OAuth2ClientCredentialsGrantCredentialsProviderBuilder tokenEndpointUri(String tokenEndpointUri)
tokenEndpointUri
- public OAuth2ClientCredentialsGrantCredentialsProvider.OAuth2ClientCredentialsGrantCredentialsProviderBuilder clientId(String clientId)
The client ID usually identifies the application that requests a token.
clientId
- public OAuth2ClientCredentialsGrantCredentialsProvider.OAuth2ClientCredentialsGrantCredentialsProviderBuilder clientSecret(String clientSecret)
clientSecret
- public OAuth2ClientCredentialsGrantCredentialsProvider.OAuth2ClientCredentialsGrantCredentialsProviderBuilder grantType(String grantType)
The default is client_credentials
, but some OAuth 2 servers can use
non-standard grant types to request tokens with extra-information.
grantType
- public OAuth2ClientCredentialsGrantCredentialsProvider.OAuth2ClientCredentialsGrantCredentialsProviderBuilder parameter(String name, String value)
These parameters can be used by the OAuth 2 server to narrow down the identify of the user.
name
- value
- public OAuth2ClientCredentialsGrantCredentialsProvider.OAuth2ClientCredentialsGrantCredentialsProviderBuilder connectionConfigurator(Consumer<HttpURLConnection> connectionConfigurator)
HttpURLConnection
before the request is sent.
Can be used to configuration settings like timeouts.
connectionConfigurator
- public OAuth2ClientCredentialsGrantCredentialsProvider.TlsConfiguration tls()
It is recommended that applications in production use HTTPS and configure it properly to perform token retrieval. Not doing so could result in sensitive data transiting in clear on the network.
You can "exit" the TLS configuration and come back to the builder by
calling OAuth2ClientCredentialsGrantCredentialsProvider.TlsConfiguration.builder()
.
OAuth2ClientCredentialsGrantCredentialsProvider.TlsConfiguration
,
OAuth2ClientCredentialsGrantCredentialsProvider.TlsConfiguration.builder()
public OAuth2ClientCredentialsGrantCredentialsProvider build()
OAuth2ClientCredentialsGrantCredentialsProvider
instance.Copyright © 2022 VMware, Inc. or its affiliates.. All rights reserved.