Package org.springframework.vault.client
Interface ReactiveVaultClient
public interface ReactiveVaultClient
Client to perform Vault HTTP requests, exposing a fluent, reactive API over
underlying
WebClient.
Use static factory methods create(), create(String), or
builder() to prepare an instance. To use the same
configuration as a WebClient, use builder(WebClient).
ReactiveVaultClient is intended to be used with relative paths
requiring a VaultEndpoint to be
configured. Without an endpoint,
callers must provide the absolute URL for each request.
For examples with a response body see:
For examples with a request body see:
- Since:
- 4.1
- Author:
- Mark Paluch
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceA mutable builder for creating aReactiveVaultClient.static interfaceContract for specifying the path for a request.static interfaceContract for specifying request headers and body leading up to the exchange.static interfaceContract for specifying request headers, body and path for a request.static interfaceContract for specifying request headers and path for a request.static interfaceContract for specifying request headers leading up to the exchange.static interfaceContract for specifying response operations following the exchange. -
Method Summary
Modifier and TypeMethodDescriptionstatic ReactiveVaultClient.Builderbuilder()Obtain aReactiveVaultClientbuilder.static ReactiveVaultClient.BuilderObtain aReactiveVaultClientbuilder based on the configuration of the givenWebClient.static ReactiveVaultClientcreate()Create a newReactiveVaultClient.static ReactiveVaultClientVariant ofcreate()that accepts a default base URL.static ReactiveVaultClientcreate(ReactiveVaultEndpointProvider endpointProvider) Variant ofcreate()that accepts a defaultReactiveVaultEndpointProvider.static ReactiveVaultClientcreate(VaultEndpoint endpoint) Variant ofcreate()that accepts a defaultVaultEndpoint.static ReactiveVaultClientcreate(VaultEndpointProvider endpointProvider) Variant ofcreate()that accepts a defaultVaultEndpointProvider.delete()Start building an HTTP DELETE request.get()Start building an HTTP GET request.method(HttpMethod method) Start building a request for the givenHttpMethod.mutate()Return a builder to create a newReactiveVaultClientwhose settings are replicated from thisReactiveVaultClient.post()Start building an HTTP POST request.put()Start building an HTTP PUT request.
-
Method Details
-
get
Start building an HTTP GET request.- Returns:
- a spec for specifying the target path.
-
post
Start building an HTTP POST request.- Returns:
- a spec for specifying the target path.
-
put
Start building an HTTP PUT request.- Returns:
- a spec for specifying the target path.
-
delete
ReactiveVaultClient.RequestHeadersPathSpec<?> delete()Start building an HTTP DELETE request.- Returns:
- a spec for specifying the target path.
-
method
Start building a request for the givenHttpMethod.- Returns:
- a spec for specifying the target path.
-
mutate
ReactiveVaultClient.Builder mutate()Return a builder to create a newReactiveVaultClientwhose settings are replicated from thisReactiveVaultClient. -
create
Create a newReactiveVaultClient.- See Also:
-
create
Variant ofcreate()that accepts a default base URL. For more details seeReactiveVaultClient.Builder.endpoint(VaultEndpoint).- Parameters:
baseUrl- the base URI for all requests.- See Also:
-
create
Variant ofcreate()that accepts a defaultVaultEndpoint. For more details seeReactiveVaultClient.Builder.endpoint(VaultEndpoint).- Parameters:
endpoint- the Vault Endpoint for all relative path requests.- See Also:
-
create
Variant ofcreate()that accepts a defaultVaultEndpointProvider. For more details seeReactiveVaultClient.Builder.endpoint(VaultEndpointProvider).- Parameters:
endpointProvider- the endpoint provider for all relative path requests.- See Also:
-
create
Variant ofcreate()that accepts a defaultReactiveVaultEndpointProvider. For more details seeReactiveVaultClient.Builder.endpoint(ReactiveVaultEndpointProvider).- Parameters:
endpointProvider- the endpoint provider for all relative path requests.- See Also:
-
builder
Obtain aReactiveVaultClientbuilder. -
builder
Obtain aReactiveVaultClientbuilder based on the configuration of the givenWebClient.The
WebClientmust be configured with appropriateHttpMessageConvertersto support String, byte[], and JSON conversion. Additionally, if the client is configured to use a base URL, the builtReactiveVaultClientcan be used with relative paths.- Parameters:
webClient- theWebClientto base the returned builder's configuration on.- Returns:
- a
ReactiveVaultClientbuilder initialized withwebClient's configuration
-