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 StringINVALID_ARGUMENT_MSGstatic StringOAUTH_ENV_AUTHORIZATION_SERVERstatic StringOAUTH_ENV_CACHE_PATHstatic StringOAUTH_ENV_CLIENT_IDstatic StringOAUTH_ENV_CLIENT_SECRETstatic StringOAUTH_ENV_CONNECT_TIMEOUTstatic StringOAUTH_ENV_READ_TIMEOUTstatic StringOAUTH_ENV_TOKEN_AUDIENCE
-
Constructor Summary
Constructors Constructor Description OAuthCredentialsProviderBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description OAuthCredentialsProviderBuilderaudience(String audience)The resource for which the the access token should be valid.OAuthCredentialsProviderBuilderauthorizationServerUrl(String authorizationServerUrl)The authorization server's URL, from which the access token will be requested.OAuthCredentialsProviderbuild()OAuthCredentialsProviderBuilderclientId(String clientId)Client id to be used when requesting access token from OAuth authorization server.OAuthCredentialsProviderBuilderclientSecret(String clientSecret)Client secret to be used when requesting access token from OAuth authorization server.OAuthCredentialsProviderBuilderconnectTimeout(Duration connectTimeout)The connection timeout of request.OAuthCredentialsProviderBuildercredentialsCachePath(String cachePath)The location for the credentials cache file.DurationgetConnectTimeout()DurationgetReadTimeout()OAuthCredentialsProviderBuilderreadTimeout(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_VALUEmilliseconds.
-
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_VALUEmilliseconds.
-
getReadTimeout
public Duration getReadTimeout()
- See Also:
readTimeout(Duration)
-
build
public OAuthCredentialsProvider build()
- Returns:
- a new
OAuthCredentialsProviderwith the provided configuration options.
-
-