Class UsernamePasswoordCredentialsFactoryBean

java.lang.Object
net.shibboleth.shared.spring.factory.AbstractFactoryBean<T>
net.shibboleth.shared.spring.factory.AbstractComponentAwareFactoryBean<org.apache.hc.client5.http.auth.UsernamePasswordCredentials>
net.shibboleth.shared.spring.httpclient.factory.UsernamePasswoordCredentialsFactoryBean
All Implemented Interfaces:
Aware, BeanClassLoaderAware, BeanFactoryAware, DisposableBean, FactoryBean<org.apache.hc.client5.http.auth.UsernamePasswordCredentials>, InitializingBean

public class UsernamePasswoordCredentialsFactoryBean extends AbstractComponentAwareFactoryBean<org.apache.hc.client5.http.auth.UsernamePasswordCredentials>
Factory bean for UsernamePasswordCredentials.

Mainly for insulation from Apache client API.

Since:
9.0.0
  • Field Details

    • username

      @Nullable private String username
      The username.
    • password

      @Nullable private String password
      The password.
  • Constructor Details

    • UsernamePasswoordCredentialsFactoryBean

      public UsernamePasswoordCredentialsFactoryBean()
  • Method Details

    • getObjectType

      @Nonnull public Class<?> getObjectType()
      This abstract method declaration mirrors the method in the FactoryBean interface, for a consistent offering of abstract template methods.
      Specified by:
      getObjectType in interface FactoryBean<org.apache.hc.client5.http.auth.UsernamePasswordCredentials>
      Specified by:
      getObjectType in class AbstractFactoryBean<org.apache.hc.client5.http.auth.UsernamePasswordCredentials>
      See Also:
    • setUsername

      public void setUsername(@Nullable String what)
      Set the username.
      Parameters:
      what - value to set
    • setPassword

      public void setPassword(@Nullable String what)
      Set the password.
      Parameters:
      what - value to set
    • doCreateInstance

      @Nonnull protected org.apache.hc.client5.http.auth.UsernamePasswordCredentials doCreateInstance() throws Exception
      Call the parent class to create the instance.
      Specified by:
      doCreateInstance in class AbstractComponentAwareFactoryBean<org.apache.hc.client5.http.auth.UsernamePasswordCredentials>
      Returns:
      the bean.
      Throws:
      Exception - if needed.