Interface EnvironmentBuilder.OAuth2Configuration
- Enclosing interface:
EnvironmentBuilder
- Since:
- 1.3.0
-
Method Summary
Modifier and TypeMethodDescriptionTLS cipher suites for HTTPS requests.Set the OAuth 2 client IDclientSecret(String clientSecret) Set the secret (password) to use to get a token.Go back to the environment builderSet the grant type to use when requesting the token.namedGroups(String... namedGroups) TLS named groups (key exchange groups) for HTTPS requests.Set a parameter to pass in the request.sslContext(SSLContext sslContext) SSLContextfor HTTPS requests.tokenEndpointUri(String uri) Set the URI to access to get the token.
-
Method Details
-
tokenEndpointUri
Set the URI to access to get the token.TLS is supported by providing a
HTTPSURI and setting aSSLContext. SeesslContext(javax.net.ssl.SSLContext)for more information. Applications in production should always use HTTPS to retrieve tokens.- Parameters:
uri- access URI- Returns:
- OAuth 2 configuration
- See Also:
-
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
Set the secret (password) to use to get a token.- Parameters:
clientSecret- client secret- Returns:
- OAuth 2 configuration
-
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
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
SSLContextfor HTTPS requests.- Parameters:
sslContext- the SSL context- Returns:
- OAuth 2 configuration
-
namedGroups
TLS named groups (key exchange groups) for HTTPS requests.Use this to select post-quantum or hybrid post-quantum key exchange, e.g.
X25519MLKEM768. RequiressslContext(javax.net.ssl.SSLContext)to be set, and Java 20 or more.- Parameters:
namedGroups- the named groups, in order of preference- Returns:
- OAuth 2 configuration
- Since:
- 1.12.0
-
ciphers
TLS cipher suites for HTTPS requests.Note this does not affect the key exchange algorithm with TLS 1.3, see
namedGroups(String...)for post-quantum key exchange. RequiressslContext(javax.net.ssl.SSLContext)to be set.- Parameters:
ciphers- the cipher suites, in order of preference- Returns:
- OAuth 2 configuration
- Since:
- 1.12.0
-
environmentBuilder
EnvironmentBuilder environmentBuilder()Go back to the environment builder- Returns:
- the environment builder
-