public interface CsrfTokenRetriever
| Modifier and Type | Field and Description |
|---|---|
static CsrfTokenRetriever |
DISABLED_CSRF_TOKEN_RETRIEVER
The disabled
CsrfTokenRetriever throws an IllegalStateException in case it is invoked. |
| Modifier and Type | Method and Description |
|---|---|
default boolean |
isEnabled()
Indicates if CSRF token retrieval is enabled.
|
CsrfToken |
retrieveCsrfToken(org.apache.http.client.HttpClient httpClient,
String servicePath)
Retrieves an CSRF Token from a remote system by issuing an CSRF token request.
|
CsrfToken |
retrieveCsrfToken(org.apache.http.client.HttpClient httpClient,
String servicePath,
Map<String,String> headers)
Retrieves an CSRF Token from a remote system by issuing an CSRF token request.
|
static final CsrfTokenRetriever DISABLED_CSRF_TOKEN_RETRIEVER
CsrfTokenRetriever throws an IllegalStateException in case it is invoked.@Nonnull CsrfToken retrieveCsrfToken(@Nonnull org.apache.http.client.HttpClient httpClient, @Nonnull String servicePath)
httpClient - The HttpClient to be used to issue the CSRF token request.servicePath - The service path (which would be appended to the destination URI) to be used to issue the CSRF token
request.CsrfToken.CsrfTokenRetrievalException - When CSRF Token could not be fetched.@Nonnull CsrfToken retrieveCsrfToken(@Nonnull org.apache.http.client.HttpClient httpClient, @Nonnull String servicePath, @Nonnull Map<String,String> headers)
httpClient - The HttpClient to be used to issue the CSRF token request.servicePath - The service path (which would be appended to the destination URI) to be used to issue the CSRF token
request.headers - Additional headers to use for the CSRF token request.CsrfToken.CsrfTokenRetrievalException - When CSRF Token could not be fetched.default boolean isEnabled()
Copyright © 2021 SAP SE. All rights reserved.