Class SyncopeClientFactoryBean

java.lang.Object
org.apache.syncope.client.lib.SyncopeClientFactoryBean

public class SyncopeClientFactoryBean extends Object
Factory bean for creating instances of SyncopeClient. Supports Spring-bean configuration and override via subclassing (see protected methods).
  • Constructor Details

    • SyncopeClientFactoryBean

      public SyncopeClientFactoryBean()
  • Method Details

    • defaultJsonProvider

      protected static com.fasterxml.jackson.jakarta.rs.json.JacksonJsonProvider defaultJsonProvider()
    • defaultXmlProvider

      protected static com.fasterxml.jackson.jakarta.rs.xml.JacksonXMLProvider defaultXmlProvider()
    • defaultYamlProvider

      protected static com.fasterxml.jackson.jakarta.rs.yaml.JacksonYAMLProvider defaultYamlProvider()
    • defaultExceptionMapper

      protected static RestClientExceptionMapper 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)
    • getXmlProvider

      public com.fasterxml.jackson.jakarta.rs.xml.JacksonXMLProvider getXmlProvider()
    • setXmlProvider

      public void setXmlProvider(com.fasterxml.jackson.jakarta.rs.xml.JacksonXMLProvider xmlProvider)
    • getYamlProvider

      public com.fasterxml.jackson.jakarta.rs.yaml.JacksonYAMLProvider getYamlProvider()
    • setYamlProvider

      public void setYamlProvider(com.fasterxml.jackson.jakarta.rs.yaml.JacksonYAMLProvider yamlProvider)
    • getExceptionMapper

      public RestClientExceptionMapper getExceptionMapper()
    • setExceptionMapper

      public SyncopeClientFactoryBean setExceptionMapper(RestClientExceptionMapper exceptionMapper)
    • getAddress

      public String getAddress()
    • setAddress

      public SyncopeClientFactoryBean setAddress(String address)
    • getContentType

      public SyncopeClientFactoryBean.ContentType getContentType()
    • setContentType

    • setContentType

      public SyncopeClientFactoryBean setContentType(String contentType)
    • getDomain

      public String getDomain()
    • setDomain

      public SyncopeClientFactoryBean setDomain(String domain)
    • setUseCompression

      public SyncopeClientFactoryBean setUseCompression(boolean useCompression)
      Sets the given service instance for transparent gzip Content-Encoding handling.
      Parameters:
      useCompression - whether transparent gzip Content-Encoding handling 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

      public SyncopeClientFactoryBean setTlsClientParameters(TLSClientParameters tlsClientParameters)
      Sets the client TLS configuration.
      Parameters:
      tlsClientParameters - client TLS configuration
      Returns:
      the current instance
    • getTlsClientParameters

      public TLSClientParameters getTlsClientParameters()
    • getRestClientFactoryBean

      public org.apache.cxf.jaxrs.client.JAXRSClientFactoryBean getRestClientFactoryBean()
    • setRestClientFactoryBean

      public SyncopeClientFactoryBean setRestClientFactoryBean(org.apache.cxf.jaxrs.client.JAXRSClientFactoryBean restClientFactoryBean)
    • create

      public SyncopeClient create(String username, String password)
      Builds client instance with the given credentials. Such credentials will be used only to obtain a valid JWT in the HttpHeaders.AUTHORIZATION header;
      Parameters:
      username - username
      password - password
      Returns:
      client instance with the given credentials
    • create

      public SyncopeClient create(String jwt)
      Builds client instance which will be passing the provided value in the HttpHeaders.AUTHORIZATION request header.
      Parameters:
      jwt - value received after login, in the RESTHeaders.TOKEN response header
      Returns:
      client instance which will be passing the provided value in the HttpHeaders.AUTHORIZATION request header
    • create

      public SyncopeClient create(AuthenticationHandler handler)
      Builds client instance with the given authentication handler.
      Parameters:
      handler - authentication handler
      Returns:
      client instance with the given authentication handler
    • createAnonymous

      public SyncopeAnonymousClient createAnonymous(String username, String password)
      Builds client instance with the given anonymous credentials.
      Parameters:
      username - username
      password - password
      Returns:
      client instance with the given credentials