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
logger
Fields inherited from interface org.springframework.beans.factory.FactoryBean
OBJECT_TYPE_ATTRIBUTE
-
Constructor Summary
ConstructorDescriptionPkiCredentialFactoryBean
(String bundle) Constructor accepting aString
which 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 TypeMethodDescriptionvoid
protected PkiCredential
protected PkiCredentialConfiguration
Returns the underlying configuration.Class
<?> void
setCredentialBundles
(CredentialBundles credentialBundles) Assigns theCredentialBundles
bean for resolving references to credentials and key stores.void
setCredentialProvider
(Function<String, PkiCredential> credentialProvider) If a configuration is used that has a credential reference, a credential provider is needed.void
setKeyStoreProvider
(Function<String, KeyStore> keyStoreProvider) If a store configuration is used that has a store reference, a key store provider is needed.void
setKeyStoreReloaderProvider
(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 aKeyStoreReloader
may 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 aString
which 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 theCredentialBundles
bean 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 aPkiCredential
based 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 aKeyStore
based 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 aKeyStoreReloader
may be needed.- Parameters:
keyStoreReloaderProvider
- provides aKeyStoreReloader
based on a key stores' registered ID
-
createInstance
- Specified by:
createInstance
in classAbstractFactoryBean<PkiCredential>
- Throws:
Exception
-
getObjectType
- Specified by:
getObjectType
in interfaceFactoryBean<PkiCredential>
- Specified by:
getObjectType
in classAbstractFactoryBean<PkiCredential>
-
afterPropertiesSet
- Specified by:
afterPropertiesSet
in interfaceInitializingBean
- Overrides:
afterPropertiesSet
in classAbstractFactoryBean<PkiCredential>
- Throws:
Exception
-
getConfiguration
Returns the underlying configuration.- Returns:
- the underlying configuration
-