Package io.camunda.zeebe.client
Interface CredentialsProvider
- All Known Implementing Classes:
NoopCredentialsProvider,OAuthCredentialsProvider
public interface CredentialsProvider
Implementations of this interface must be thread-safe.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceUsed to apply call credentials on a per-request basis, abstracting over gRPC and REST.static interfaceRepresents the result of a failed call, abstracting over gRPC and standard HTTP status codes. -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds credentials to the headers.booleanshouldRetryRequest(CredentialsProvider.StatusCode statusCode) Returns true if the request should be retried; otherwise returns false.
-
Method Details
-
applyCredentials
Adds credentials to the headers. For an example of this, seeOAuthCredentialsProvider.applyCredentials(CredentialsApplier)- Parameters:
applier- where to add the credentials headers- Throws:
IOException
-
shouldRetryRequest
Returns true if the request should be retried; otherwise returns false. For an example of this, seeOAuthCredentialsProvider.shouldRetryRequest(StatusCode).Only called for REST calls
- Parameters:
statusCode- the response code for the failure
-
newCredentialsProviderBuilder
- Returns:
- a builder to configure and create a new
OAuthCredentialsProvider.
-