Class DefaultCsrfTokenRetriever
java.lang.Object
com.sap.cloud.sdk.cloudplatform.connectivity.DefaultCsrfTokenRetriever
- All Implemented Interfaces:
CsrfTokenRetriever
Default implementation for retrieving a CSRF token from a given remote system.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The HTTP header name for the loading the CSRF token.Fields inherited from interface com.sap.cloud.sdk.cloudplatform.connectivity.CsrfTokenRetriever
DISABLED_CSRF_TOKEN_RETRIEVER
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
boolean
int
hashCode()
retrieveCsrfToken
(org.apache.http.client.HttpClient httpClient, String servicePath) Retrieves an CSRF Token from a remote system by issuing an CSRF token request.retrieveCsrfToken
(org.apache.http.client.HttpClient httpClient, String servicePath, Map<String, Collection<String>> headers) Retrieves an CSRF Token from a remote system by issuing an CSRF token request.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.sap.cloud.sdk.cloudplatform.connectivity.CsrfTokenRetriever
isEnabled
-
Field Details
-
X_CSRF_TOKEN_HEADER_KEY
The HTTP header name for the loading the CSRF token.- See Also:
-
-
Constructor Details
-
DefaultCsrfTokenRetriever
public DefaultCsrfTokenRetriever()
-
-
Method Details
-
retrieveCsrfToken
@Nonnull public CsrfToken retrieveCsrfToken(@Nonnull org.apache.http.client.HttpClient httpClient, @Nonnull String servicePath) Description copied from interface:CsrfTokenRetriever
Retrieves an CSRF Token from a remote system by issuing an CSRF token request.- Specified by:
retrieveCsrfToken
in interfaceCsrfTokenRetriever
- Parameters:
httpClient
- TheHttpClient
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.- Returns:
- The fetched
CsrfToken
.
-
retrieveCsrfToken
@Nonnull public CsrfToken retrieveCsrfToken(@Nonnull org.apache.http.client.HttpClient httpClient, @Nonnull String servicePath, @Nonnull Map<String, Collection<String>> headers) Description copied from interface:CsrfTokenRetriever
Retrieves an CSRF Token from a remote system by issuing an CSRF token request.- Specified by:
retrieveCsrfToken
in interfaceCsrfTokenRetriever
- Parameters:
httpClient
- TheHttpClient
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.- Returns:
- The fetched
CsrfToken
.
-
equals
-
canEqual
-
hashCode
public int hashCode()
-