Class BasicAuthClientHttpRequestFactory

java.lang.Object
org.citrusframework.http.client.BasicAuthClientHttpRequestFactory
All Implemented Interfaces:
InitializingPhase, org.springframework.beans.factory.FactoryBean<org.springframework.http.client.HttpComponentsClientHttpRequestFactory>

public class BasicAuthClientHttpRequestFactory extends Object implements org.springframework.beans.factory.FactoryBean<org.springframework.http.client.HttpComponentsClientHttpRequestFactory>, InitializingPhase
Factory bean constructing a client request factory with user credentials for basic authentication.
Since:
1.2
Author:
Christoph Deppisch
  • Field Summary

    Fields inherited from interface org.springframework.beans.factory.FactoryBean

    OBJECT_TYPE_ATTRIBUTE
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.springframework.http.client.HttpComponentsClientHttpRequestFactory
    Construct the client factory bean with user credentials.
    Get the object type.
    void
     
    boolean
    Is singleton bean?
    void
    setAuthScope(org.apache.hc.client5.http.auth.AuthScope authScope)
    Sets the authScope.
    void
    setCredentials(org.apache.hc.client5.http.auth.Credentials credentials)
    Sets the credentials.
    void
    setHttpClient(org.apache.hc.client5.http.classic.HttpClient httpClient)
    Sets the httpClient.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • BasicAuthClientHttpRequestFactory

      public BasicAuthClientHttpRequestFactory()
  • Method Details

    • getObject

      public org.springframework.http.client.HttpComponentsClientHttpRequestFactory getObject() throws Exception
      Construct the client factory bean with user credentials.
      Specified by:
      getObject in interface org.springframework.beans.factory.FactoryBean<org.springframework.http.client.HttpComponentsClientHttpRequestFactory>
      Throws:
      Exception
    • getObjectType

      public Class<?> getObjectType()
      Get the object type.
      Specified by:
      getObjectType in interface org.springframework.beans.factory.FactoryBean<org.springframework.http.client.HttpComponentsClientHttpRequestFactory>
    • isSingleton

      public boolean isSingleton()
      Is singleton bean?
      Specified by:
      isSingleton in interface org.springframework.beans.factory.FactoryBean<org.springframework.http.client.HttpComponentsClientHttpRequestFactory>
    • initialize

      public void initialize()
      Specified by:
      initialize in interface InitializingPhase
    • setCredentials

      public void setCredentials(org.apache.hc.client5.http.auth.Credentials credentials)
      Sets the credentials.
      Parameters:
      credentials - the credentials to set
    • setAuthScope

      public void setAuthScope(org.apache.hc.client5.http.auth.AuthScope authScope)
      Sets the authScope.
      Parameters:
      authScope - the authScope to set
    • setHttpClient

      public void setHttpClient(org.apache.hc.client5.http.classic.HttpClient httpClient)
      Sets the httpClient.
      Parameters:
      httpClient - the httpClient to set