Package com.sap.cloud.security.client
Interface HttpClientFactory
-
- All Known Implementing Classes:
DefaultHttpClientFactory
public interface HttpClientFactoryRepresents aCloseableHttpClientcreation interface.
-
-
Field Summary
Fields Modifier and Type Field Description static StringDEFAULT_HTTP_CLIENT_FACTORYstatic List<HttpClientFactory>services
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static org.apache.http.impl.client.CloseableHttpClientcreate(ClientIdentity clientIdentity)Don't close the HTTPClient when you've provided it toTokenAuthenticatororXsuaaTokenFlowsinstance.org.apache.http.impl.client.CloseableHttpClientcreateClient(ClientIdentity clientIdentity)Provides CloseableHttpClient based on ClientIdentity details.
-
-
-
Field Detail
-
services
static final List<HttpClientFactory> services
-
DEFAULT_HTTP_CLIENT_FACTORY
static final String DEFAULT_HTTP_CLIENT_FACTORY
- See Also:
- Constant Field Values
-
-
Method Detail
-
createClient
org.apache.http.impl.client.CloseableHttpClient createClient(ClientIdentity clientIdentity) throws HttpClientException
Provides CloseableHttpClient based on ClientIdentity details. For ClientIdentity that is certificate based it will resolve https client using the provided ClientIdentity, if the ClientIdentity wasn't provided it will return default HttpClient.- Parameters:
clientIdentity- for X.509 certificate based communicationClientCertificateimplementation of ClientIdentity interface should be provided- Returns:
- HTTP or HTTPS client
- Throws:
HttpClientException- in case HTTPS Client could not be setup
-
create
static org.apache.http.impl.client.CloseableHttpClient create(ClientIdentity clientIdentity) throws HttpClientException
Don't close the HTTPClient when you've provided it toTokenAuthenticatororXsuaaTokenFlowsinstance.- Parameters:
clientIdentity- to identify the identity provider client.- Returns:
- HTTP or HTTPS client
- Throws:
HttpClientException
-
-