Class PkiCredentialFactoryBean
java.lang.Object
org.springframework.beans.factory.config.AbstractFactoryBean<PkiCredential>
se.swedenconnect.security.credential.spring.factory.PkiCredentialFactoryBean
- All Implemented Interfaces:
Aware,BeanClassLoaderAware,BeanFactoryAware,DisposableBean,FactoryBean<PkiCredential>,InitializingBean
- Direct Known Subclasses:
PkiCredentialFactoryBean
A
FactoryBean for creating PkiCredential objects.- Author:
- Martin Lindström
- See Also:
-
Field Summary
Fields inherited from class org.springframework.beans.factory.config.AbstractFactoryBean
loggerFields inherited from interface org.springframework.beans.factory.FactoryBean
OBJECT_TYPE_ATTRIBUTE -
Constructor Summary
ConstructorsConstructorDescriptionPkiCredentialFactoryBean(String bundle) Constructor accepting aStringwhich is a reference to a registeredPkiCredential.PkiCredentialFactoryBean(PemCredentialConfiguration configuration) Constructor aceepting aPemCredentialConfiguration.PkiCredentialFactoryBean(PkiCredentialConfiguration configuration) Constructor aceepting aPkiCredentialConfiguration.PkiCredentialFactoryBean(StoreCredentialConfiguration configuration) Constructor aceepting aStoreCredentialConfiguration. -
Method Summary
Modifier and TypeMethodDescriptionvoidprotected PkiCredentialprotected PkiCredentialConfigurationReturns the underlying configuration.Class<?> voidsetCredentialBundles(CredentialBundles credentialBundles) Assigns theCredentialBundlesbean for resolving references to credentials and key stores.voidsetCredentialProvider(Function<String, PkiCredential> credentialProvider) If a configuration is used that has a credential reference, a credential provider is needed.voidsetKeyStoreProvider(Function<String, KeyStore> keyStoreProvider) If a store configuration is used that has a store reference, a key store provider is needed.voidsetKeyStoreReloaderProvider(Function<String, KeyStoreReloader> keyStoreReloaderProvider) If a store configuration is used that has a store reference, and that reference points to aReloadablePkiCredential, a resolver function for getting aKeyStoreReloadermay be needed.Methods inherited from class org.springframework.beans.factory.config.AbstractFactoryBean
destroy, destroyInstance, getBeanFactory, getBeanTypeConverter, getEarlySingletonInterfaces, getObject, isSingleton, setBeanClassLoader, setBeanFactory, setSingleton
-
Constructor Details
-
PkiCredentialFactoryBean
Constructor aceepting aPkiCredentialConfiguration.- Parameters:
configuration- the configuration
-
PkiCredentialFactoryBean
Constructor accepting aStringwhich is a reference to a registeredPkiCredential.- Parameters:
bundle- bundle reference
-
PkiCredentialFactoryBean
Constructor aceepting aStoreCredentialConfiguration.- Parameters:
configuration- the configuration
-
PkiCredentialFactoryBean
Constructor aceepting aPemCredentialConfiguration.- Parameters:
configuration- the configuration
-
-
Method Details
-
setCredentialBundles
Assigns theCredentialBundlesbean for resolving references to credentials and key stores.Also see
setCredentialProvider(Function)andsetKeyStoreProvider(Function).- Parameters:
credentialBundles- the credential bundles bean
-
setCredentialProvider
If a configuration is used that has a credential reference, a credential provider is needed.An alternative to assigned this function, is to assign a
CredentialBundles, seesetCredentialBundles(CredentialBundles).- Parameters:
credentialProvider- provides aPkiCredentialbased on its registered ID
-
setKeyStoreProvider
If a store configuration is used that has a store reference, a key store provider is needed.An alternative to assigned this function, is to assign a
CredentialBundles, seesetCredentialBundles(CredentialBundles).- Parameters:
keyStoreProvider- provides aKeyStorebased on its registered ID
-
setKeyStoreReloaderProvider
public void setKeyStoreReloaderProvider(@Nonnull Function<String, KeyStoreReloader> keyStoreReloaderProvider) If a store configuration is used that has a store reference, and that reference points to aReloadablePkiCredential, a resolver function for getting aKeyStoreReloadermay be needed.- Parameters:
keyStoreReloaderProvider- provides aKeyStoreReloaderbased on a key stores' registered ID
-
createInstance
- Specified by:
createInstancein classAbstractFactoryBean<PkiCredential>- Throws:
Exception
-
getObjectType
- Specified by:
getObjectTypein interfaceFactoryBean<PkiCredential>- Specified by:
getObjectTypein classAbstractFactoryBean<PkiCredential>
-
afterPropertiesSet
- Specified by:
afterPropertiesSetin interfaceInitializingBean- Overrides:
afterPropertiesSetin classAbstractFactoryBean<PkiCredential>- Throws:
Exception
-
getConfiguration
Returns the underlying configuration.- Returns:
- the underlying configuration
-