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
FieldsModifier and TypeFieldDescriptionstatic final StringThe 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleaninthashCode()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, waitMethods 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:CsrfTokenRetrieverRetrieves an CSRF Token from a remote system by issuing an CSRF token request.- Specified by:
retrieveCsrfTokenin interfaceCsrfTokenRetriever- Parameters:
httpClient- TheHttpClientto 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:CsrfTokenRetrieverRetrieves an CSRF Token from a remote system by issuing an CSRF token request.- Specified by:
retrieveCsrfTokenin interfaceCsrfTokenRetriever- Parameters:
httpClient- TheHttpClientto 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()
-