Package org.apache.syncope.client.lib
Class SyncopeClientFactoryBean
java.lang.Object
org.apache.syncope.client.lib.SyncopeClientFactoryBean
Factory bean for creating instances of
SyncopeClient.
Supports Spring-bean configuration and override via subclassing (see protected methods).-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionBuilds client instance which will be passing the provided value in theHttpHeaders.AUTHORIZATIONrequest header.Builds client instance with the given credentials.create(AuthenticationHandler handler) Builds client instance with the given authentication handler.createAnonymous(String username, String password) Builds client instance with the given anonymous credentials.protected static RestClientExceptionMapperprotected static org.apache.cxf.transports.http.configuration.HTTPClientPolicyprotected static com.fasterxml.jackson.jakarta.rs.json.JacksonJsonProviderprotected org.apache.cxf.jaxrs.client.JAXRSClientFactoryBeanorg.apache.cxf.transports.http.configuration.HTTPClientPolicycom.fasterxml.jackson.jakarta.rs.json.JacksonJsonProviderorg.apache.cxf.jaxrs.client.JAXRSClientFactoryBeanbooleansetAddress(String address) setExceptionMapper(RestClientExceptionMapper exceptionMapper) setHttpClientPolicy(org.apache.cxf.transports.http.configuration.HTTPClientPolicy httpClientPolicy) voidsetJsonProvider(com.fasterxml.jackson.jakarta.rs.json.JacksonJsonProvider jsonProvider) setRestClientFactoryBean(org.apache.cxf.jaxrs.client.JAXRSClientFactoryBean restClientFactoryBean) setTlsClientParameters(TLSClientParameters tlsClientParameters) Sets the client TLS configuration.setUseCompression(boolean useCompression) Sets the given service instance for transparent gzipContent-Encodinghandling.
-
Constructor Details
-
SyncopeClientFactoryBean
public SyncopeClientFactoryBean()
-
-
Method Details
-
defaultJsonProvider
protected static com.fasterxml.jackson.jakarta.rs.json.JacksonJsonProvider defaultJsonProvider() -
defaultExceptionMapper
-
defaultHTTPClientPolicy
protected static org.apache.cxf.transports.http.configuration.HTTPClientPolicy defaultHTTPClientPolicy() -
defaultRestClientFactoryBean
protected org.apache.cxf.jaxrs.client.JAXRSClientFactoryBean defaultRestClientFactoryBean() -
getJsonProvider
public com.fasterxml.jackson.jakarta.rs.json.JacksonJsonProvider getJsonProvider() -
setJsonProvider
public void setJsonProvider(com.fasterxml.jackson.jakarta.rs.json.JacksonJsonProvider jsonProvider) -
getExceptionMapper
-
setExceptionMapper
-
getAddress
-
setAddress
-
getDomain
-
setDomain
-
setUseCompression
Sets the given service instance for transparent gzipContent-Encodinghandling.- Parameters:
useCompression- whether transparent gzipContent-Encodinghandling is to be enabled- Returns:
- the current instance
-
isUseCompression
public boolean isUseCompression() -
setHttpClientPolicy
public SyncopeClientFactoryBean setHttpClientPolicy(org.apache.cxf.transports.http.configuration.HTTPClientPolicy httpClientPolicy) -
getHttpClientPolicy
public org.apache.cxf.transports.http.configuration.HTTPClientPolicy getHttpClientPolicy() -
setTlsClientParameters
Sets the client TLS configuration.- Parameters:
tlsClientParameters- client TLS configuration- Returns:
- the current instance
-
getTlsClientParameters
-
getRestClientFactoryBean
public org.apache.cxf.jaxrs.client.JAXRSClientFactoryBean getRestClientFactoryBean() -
setRestClientFactoryBean
public SyncopeClientFactoryBean setRestClientFactoryBean(org.apache.cxf.jaxrs.client.JAXRSClientFactoryBean restClientFactoryBean) -
create
Builds client instance with the given credentials. Such credentials will be used only to obtain a valid JWT in theHttpHeaders.AUTHORIZATIONheader;- Parameters:
username- usernamepassword- password- Returns:
- client instance with the given credentials
-
create
Builds client instance which will be passing the provided value in theHttpHeaders.AUTHORIZATIONrequest header.- Parameters:
jwt- value received after login, in theRESTHeaders.TOKENresponse header- Returns:
- client instance which will be passing the provided value in the
HttpHeaders.AUTHORIZATIONrequest header
-
create
Builds client instance with the given authentication handler.- Parameters:
handler- authentication handler- Returns:
- client instance with the given authentication handler
-
createAnonymous
Builds client instance with the given anonymous credentials.- Parameters:
username- usernamepassword- password- Returns:
- client instance with the given credentials
-