Class UsernamePasswordCredentialsFactoryBean
java.lang.Object
org.springframework.beans.factory.config.AbstractFactoryBean<T>
net.shibboleth.shared.spring.factory.AbstractComponentAwareFactoryBean<org.apache.hc.client5.http.auth.UsernamePasswordCredentials>
net.shibboleth.shared.spring.httpclient.factory.UsernamePasswordCredentialsFactoryBean
- All Implemented Interfaces:
Aware,BeanClassLoaderAware,BeanFactoryAware,DisposableBean,FactoryBean<org.apache.hc.client5.http.auth.UsernamePasswordCredentials>,InitializingBean
- Direct Known Subclasses:
UsernamePasswoordCredentialsFactoryBean
public class UsernamePasswordCredentialsFactoryBean
extends AbstractComponentAwareFactoryBean<org.apache.hc.client5.http.auth.UsernamePasswordCredentials>
Factory bean for
UsernamePasswordCredentials.
Mainly for insulation from Apache client API.
- Since:
- 9.3.0
-
Field Summary
FieldsFields inherited from class org.springframework.beans.factory.config.AbstractFactoryBean
loggerFields inherited from interface org.springframework.beans.factory.FactoryBean
OBJECT_TYPE_ATTRIBUTE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected org.apache.hc.client5.http.auth.UsernamePasswordCredentialsCall the parent class to create the instance.Class<?>voidsetPassword(String what) Set the password.voidsetUsername(String what) Set the username.Methods inherited from class net.shibboleth.shared.spring.factory.AbstractComponentAwareFactoryBean
createInstance, destroyInstance, setThrowIfNullMethods inherited from class org.springframework.beans.factory.config.AbstractFactoryBean
afterPropertiesSet, destroy, getBeanFactory, getBeanTypeConverter, getEarlySingletonInterfaces, getObject, isSingleton, setBeanClassLoader, setBeanFactory, setSingleton
-
Field Details
-
username
The username. -
password
The password.
-
-
Constructor Details
-
UsernamePasswordCredentialsFactoryBean
public UsernamePasswordCredentialsFactoryBean()
-
-
Method Details
-
getObjectType
- Specified by:
getObjectTypein interfaceFactoryBean<org.apache.hc.client5.http.auth.UsernamePasswordCredentials>- Specified by:
getObjectTypein classAbstractFactoryBean<org.apache.hc.client5.http.auth.UsernamePasswordCredentials>
-
setUsername
Set the username.- Parameters:
what- value to set
-
setPassword
Set the password.- Parameters:
what- value to set
-
doCreateInstance
@Nonnull protected org.apache.hc.client5.http.auth.UsernamePasswordCredentials doCreateInstance() throws ExceptionCall the parent class to create the instance.- Specified by:
doCreateInstancein classAbstractComponentAwareFactoryBean<org.apache.hc.client5.http.auth.UsernamePasswordCredentials>- Returns:
- the bean
- Throws:
Exception- if needed
-