Class BasicAuthConnectionProviderBase

  • All Implemented Interfaces:
    org.mule.runtime.api.connection.CachedConnectionProvider<com.mulesoft.connectivity.rest.commons.api.connection.RestConnection>, org.mule.runtime.api.connection.ConnectionProvider<com.mulesoft.connectivity.rest.commons.api.connection.RestConnection>, org.mule.runtime.api.lifecycle.Initialisable, org.mule.runtime.api.lifecycle.Startable, org.mule.runtime.api.lifecycle.Stoppable, org.mule.runtime.extension.api.connectivity.NoConnectivityTest, org.mule.sdk.api.connectivity.NoConnectivityTest
    Direct Known Subclasses:
    BasicAuthConnectionProviderRefinement

    public class BasicAuthConnectionProviderBase
    extends com.mulesoft.connectivity.rest.commons.api.connection.BasicAuthenticationConnectionProvider
    implements org.mule.runtime.extension.api.connectivity.NoConnectivityTest
    This is the first layer of the connection provider generation gap pattern. It contains most of the logic of the connection provider.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected String baseUri  
      protected String password  
      protected HttpProxyConfig proxyConfig
      Reusable configuration element for outbound connections through a proxy.
      protected com.mulesoft.connectivity.rest.commons.api.connection.OptionalTlsParameterGroup tlsConfig
      OptionalTlsParameterGroup references to a TLS config element.
      protected String username  
      • Fields inherited from interface org.mule.runtime.api.lifecycle.Initialisable

        PHASE_NAME
      • Fields inherited from interface org.mule.runtime.api.lifecycle.Startable

        PHASE_NAME
      • Fields inherited from interface org.mule.runtime.api.lifecycle.Stoppable

        PHASE_NAME
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      String getBaseUri()  
      String getPassword()  
      org.mule.runtime.http.api.client.proxy.ProxyConfig getProxyConfig()  
      Optional<com.mulesoft.connectivity.rest.commons.api.connection.TlsParameterGroup> getTlsConfig()
      TlsParameterGroup that configures TLS and allows to switch between HTTP and HTTPS protocols.
      String getUsername()  
      • Methods inherited from class com.mulesoft.connectivity.rest.commons.api.connection.BasicAuthenticationConnectionProvider

        buildAuthentication
      • Methods inherited from class com.mulesoft.connectivity.rest.commons.api.connection.BaseConnectionProvider

        configureClient, connect, createConnection, disconnect, getBindings, getConfigName, getConnectionIdleTimeout, getConnectionIdleTimeoutUnit, getConnectionTimeout, getConnectionTimeoutUnit, getDefaultHeaders, getDefaultQueryParams, getExpressionLanguage, getMaxConnections, getResponseBufferSize, initialise, isStreamResponse, isUsePersistentConnections, start, stop, validate, validate
    • Field Detail

      • baseUri

        @DisplayName("Base Uri")
        @Summary("Parameter base URI, each instance/tenant gets its own")
        @Parameter
        @Url
        @Optional(defaultValue="https://mocksvc.mulesoft.com/mocks/0af00e94-58b6-4b6a-973c-2914cd3ad782")
        protected String baseUri
      • username

        @Parameter
        @Username
        @DisplayName("Username")
        @Summary("The username used to authenticate the requests.")
        protected String username
      • password

        @Parameter
        @Password
        @Optional
        @DisplayName("Password")
        @Summary("The password used to authenticate the requests.")
        protected String password
      • tlsConfig

        @ParameterGroup(name="tls")
        protected com.mulesoft.connectivity.rest.commons.api.connection.OptionalTlsParameterGroup tlsConfig
        OptionalTlsParameterGroup references to a TLS config element. This will enable HTTPS for this config.
      • proxyConfig

        @Parameter
        @Optional
        @Expression(NOT_SUPPORTED)
        @Summary("Reusable configuration element for outbound connections through a proxy")
        @Placement(tab="Proxy")
        protected HttpProxyConfig proxyConfig
        Reusable configuration element for outbound connections through a proxy. A proxy element must define a host name and a port attributes, and optionally can define a username and a password.
    • Constructor Detail

      • BasicAuthConnectionProviderBase

        public BasicAuthConnectionProviderBase()
    • Method Detail

      • getBaseUri

        public String getBaseUri()
        Specified by:
        getBaseUri in class com.mulesoft.connectivity.rest.commons.api.connection.BaseConnectionProvider
        Returns:
        the base uri of the REST API being consumed
      • getUsername

        public String getUsername()
        Specified by:
        getUsername in class com.mulesoft.connectivity.rest.commons.api.connection.BasicAuthenticationConnectionProvider
      • getPassword

        public String getPassword()
        Specified by:
        getPassword in class com.mulesoft.connectivity.rest.commons.api.connection.BasicAuthenticationConnectionProvider
      • getTlsConfig

        public Optional<com.mulesoft.connectivity.rest.commons.api.connection.TlsParameterGroup> getTlsConfig()
        TlsParameterGroup that configures TLS and allows to switch between HTTP and HTTPS protocols.
        Overrides:
        getTlsConfig in class com.mulesoft.connectivity.rest.commons.api.connection.BaseConnectionProvider
        Returns:
        an optional TlsParameterGroup
      • getProxyConfig

        public org.mule.runtime.http.api.client.proxy.ProxyConfig getProxyConfig()
        Specified by:
        getProxyConfig in class com.mulesoft.connectivity.rest.commons.api.connection.BaseConnectionProvider