Package com.rabbitmq.stream
Interface EnvironmentBuilder.OAuth2Configuration
-
- Enclosing interface:
- EnvironmentBuilder
public static interface EnvironmentBuilder.OAuth2ConfigurationConfiguration to retrieve a token using the OAuth 2 Client Credentials flow.- Since:
- 1.3.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description EnvironmentBuilder.OAuth2ConfigurationclientId(String clientId)Set the OAuth 2 client IDEnvironmentBuilder.OAuth2ConfigurationclientSecret(String clientSecret)Set the secret (password) to use to get a token.EnvironmentBuilderenvironmentBuilder()Go back to the environment builderEnvironmentBuilder.OAuth2ConfigurationgrantType(String grantType)Set the grant type to use when requesting the token.EnvironmentBuilder.OAuth2Configurationparameter(String name, String value)Set a parameter to pass in the request.EnvironmentBuilder.OAuth2ConfigurationsslContext(SSLContext sslContext)SSLContextfor HTTPS requests.EnvironmentBuilder.OAuth2ConfigurationtokenEndpointUri(String uri)Set the URI to access to get the token.
-
-
-
Method Detail
-
tokenEndpointUri
EnvironmentBuilder.OAuth2Configuration tokenEndpointUri(String uri)
Set the URI to access to get the token.TLS is supported by providing a
HTTPSURI and setting aSSLContext. SeeEnvironmentBuilder.tls()for more information. Applications in production should always use HTTPS to retrieve tokens.- Parameters:
uri- access URI- Returns:
- OAuth 2 configuration
- See Also:
sslContext(javax.net.ssl.SSLContext)
-
clientId
EnvironmentBuilder.OAuth2Configuration clientId(String clientId)
Set the OAuth 2 client IDThe client ID usually identifies the application that requests a token.
- Parameters:
clientId- client ID- Returns:
- OAuth 2 configuration
-
clientSecret
EnvironmentBuilder.OAuth2Configuration clientSecret(String clientSecret)
Set the secret (password) to use to get a token.- Parameters:
clientSecret- client secret- Returns:
- OAuth 2 configuration
-
grantType
EnvironmentBuilder.OAuth2Configuration grantType(String grantType)
Set the grant type to use when requesting the token.The default is
client_credentials, but some OAuth 2 servers can use non-standard grant types to request tokens with extra-information.- Parameters:
grantType- grant type- Returns:
- OAuth 2 configuration
-
parameter
EnvironmentBuilder.OAuth2Configuration parameter(String name, String value)
Set a parameter to pass in the request.The OAuth 2 server may require extra parameters to narrow down the identity of the user.
- Parameters:
name- name of the parametervalue- value of the parameter- Returns:
- OAuth 2 configuration
-
sslContext
EnvironmentBuilder.OAuth2Configuration sslContext(SSLContext sslContext)
SSLContextfor HTTPS requests.- Parameters:
sslContext- the SSL context- Returns:
- OAuth 2 configuration
-
environmentBuilder
EnvironmentBuilder environmentBuilder()
Go back to the environment builder- Returns:
- the environment builder
-
-