Class OAuthCredentialsProviderBuilder
- java.lang.Object
-
- io.camunda.zeebe.client.impl.oauth.OAuthCredentialsProviderBuilder
-
public final class OAuthCredentialsProviderBuilder extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static String
INVALID_ARGUMENT_MSG
static String
OAUTH_ENV_AUTHORIZATION_SERVER
static String
OAUTH_ENV_CACHE_PATH
static String
OAUTH_ENV_CLIENT_ID
static String
OAUTH_ENV_CLIENT_SECRET
static String
OAUTH_ENV_CONNECT_TIMEOUT
static String
OAUTH_ENV_READ_TIMEOUT
static String
OAUTH_ENV_TOKEN_AUDIENCE
-
Constructor Summary
Constructors Constructor Description OAuthCredentialsProviderBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description OAuthCredentialsProviderBuilder
audience(String audience)
The resource for which the the access token should be valid.OAuthCredentialsProviderBuilder
authorizationServerUrl(String authorizationServerUrl)
The authorization server's URL, from which the access token will be requested.OAuthCredentialsProvider
build()
OAuthCredentialsProviderBuilder
clientId(String clientId)
Client id to be used when requesting access token from OAuth authorization server.OAuthCredentialsProviderBuilder
clientSecret(String clientSecret)
Client secret to be used when requesting access token from OAuth authorization server.OAuthCredentialsProviderBuilder
connectTimeout(Duration connectTimeout)
The connection timeout of request.OAuthCredentialsProviderBuilder
credentialsCachePath(String cachePath)
The location for the credentials cache file.Duration
getConnectTimeout()
Duration
getReadTimeout()
OAuthCredentialsProviderBuilder
readTimeout(Duration readTimeout)
The data read timeout of request.
-
-
-
Field Detail
-
INVALID_ARGUMENT_MSG
public static final String INVALID_ARGUMENT_MSG
- See Also:
- Constant Field Values
-
OAUTH_ENV_CLIENT_ID
public static final String OAUTH_ENV_CLIENT_ID
- See Also:
- Constant Field Values
-
OAUTH_ENV_CLIENT_SECRET
public static final String OAUTH_ENV_CLIENT_SECRET
- See Also:
- Constant Field Values
-
OAUTH_ENV_TOKEN_AUDIENCE
public static final String OAUTH_ENV_TOKEN_AUDIENCE
- See Also:
- Constant Field Values
-
OAUTH_ENV_AUTHORIZATION_SERVER
public static final String OAUTH_ENV_AUTHORIZATION_SERVER
- See Also:
- Constant Field Values
-
OAUTH_ENV_CACHE_PATH
public static final String OAUTH_ENV_CACHE_PATH
- See Also:
- Constant Field Values
-
OAUTH_ENV_CONNECT_TIMEOUT
public static final String OAUTH_ENV_CONNECT_TIMEOUT
- See Also:
- Constant Field Values
-
OAUTH_ENV_READ_TIMEOUT
public static final String OAUTH_ENV_READ_TIMEOUT
- See Also:
- Constant Field Values
-
-
Method Detail
-
clientId
public OAuthCredentialsProviderBuilder clientId(String clientId)
Client id to be used when requesting access token from OAuth authorization server.
-
clientSecret
public OAuthCredentialsProviderBuilder clientSecret(String clientSecret)
Client secret to be used when requesting access token from OAuth authorization server.
-
audience
public OAuthCredentialsProviderBuilder audience(String audience)
The resource for which the the access token should be valid.
-
authorizationServerUrl
public OAuthCredentialsProviderBuilder authorizationServerUrl(String authorizationServerUrl)
The authorization server's URL, from which the access token will be requested.
-
credentialsCachePath
public OAuthCredentialsProviderBuilder credentialsCachePath(String cachePath)
The location for the credentials cache file. If none (or null) is specified the default will be $HOME/.camunda/credentials
-
connectTimeout
public OAuthCredentialsProviderBuilder connectTimeout(Duration connectTimeout)
The connection timeout of request. The default value is 5 seconds. Max value isInteger.MAX_VALUE
milliseconds.
-
getConnectTimeout
public Duration getConnectTimeout()
- See Also:
connectTimeout(Duration)
-
readTimeout
public OAuthCredentialsProviderBuilder readTimeout(Duration readTimeout)
The data read timeout of request. The default value is 5 seconds. Max value isInteger.MAX_VALUE
milliseconds.
-
getReadTimeout
public Duration getReadTimeout()
- See Also:
readTimeout(Duration)
-
build
public OAuthCredentialsProvider build()
- Returns:
- a new
OAuthCredentialsProvider
with the provided configuration options.
-
-