Package org.opensaml.spring.credential
Class BasicX509CredentialFactoryBean
java.lang.Object
net.shibboleth.shared.spring.factory.AbstractFactoryBean<T>
net.shibboleth.shared.spring.factory.AbstractComponentAwareFactoryBean<T>
org.opensaml.spring.credential.AbstractCredentialFactoryBean<BasicX509Credential>
org.opensaml.spring.credential.AbstractX509CredentialFactoryBean
org.opensaml.spring.credential.BasicX509CredentialFactoryBean
- All Implemented Interfaces:
Aware,BeanClassLoaderAware,BeanFactoryAware,DisposableBean,FactoryBean<BasicX509Credential>,InitializingBean
Spring bean factory for producing a
BasicX509Credential from Resources.
This factory bean supports DER and PEM encoded certificate resources and encrypted and non-encrypted PKCS8, DER, or PEM encoded private key resources.
-
Field Summary
FieldsModifier and TypeFieldDescriptionWhere the certificates are to be found.Where the crls are to be found.private ResourceThe specification of where the entity Resource is to be found.private final org.slf4j.Loggerlog.private ResourceWhere the private key is to be found.Fields inherited from interface org.springframework.beans.factory.FactoryBean
OBJECT_TYPE_ATTRIBUTE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected List<X509Certificate>Get the configured certificates.getCRLs()Get the configured CRL list.protected X509Certificatereturn the explicitly configured entity certificate.protected PrivateKeyGet the configured private key.booleanvoidSet the certificate resource.voidsetCertificates(List<Resource> what) Sets the Resources which contain the certificates.voidSets the Resources which contain the crls.voidSet the Resource with the entity certificate.voidsetEntityId(String id) Set the entityID for the credential.voidsetPrivateKey(Resource what) Set the Resource with the entity certificate.voidsetPrivateKeyPassword(String password) Set the password for the private key.voidSet the resource containing the private key.Methods inherited from class org.opensaml.spring.credential.AbstractX509CredentialFactoryBean
doCreateInstance, getObjectTypeMethods inherited from class org.opensaml.spring.credential.AbstractCredentialFactoryBean
getConfigDescription, getEntityID, getKeyNames, getPrivateKeyPassword, getUsageType, setConfigDescription, setEntityID, setKeyNames, setPrivateKeyPassword, setUsageTypeMethods inherited from class net.shibboleth.shared.spring.factory.AbstractComponentAwareFactoryBean
createInstance, destroyInstance, setThrowIfNullMethods inherited from class net.shibboleth.shared.spring.factory.AbstractFactoryBean
afterPropertiesSet, destroy, getBeanFactory, getBeanTypeConverter, getEarlySingletonInterfaces, getObject, setBeanClassLoader, setBeanFactory, setSingleton
-
Field Details
-
log
@Nonnull private final org.slf4j.Logger loglog. -
entityResource
The specification of where the entity Resource is to be found. -
certificateResources
Where the certificates are to be found. -
privateKeyResource
Where the private key is to be found. -
crlResources
Where the crls are to be found.
-
-
Constructor Details
-
BasicX509CredentialFactoryBean
public BasicX509CredentialFactoryBean()
-
-
Method Details
-
setCertificates
Sets the Resources which contain the certificates.- Parameters:
what- The values to set.
-
setCRLs
Sets the Resources which contain the crls.- Parameters:
what- The value to set.
-
setPrivateKeyPassword
Set the password for the private key.- Parameters:
password- password for the private key, may be null if the key is not encrypted
-
setEntityId
Set the entityID for the credential.- Parameters:
id- entityID
-
isSingleton
public boolean isSingleton()- Specified by:
isSingletonin interfaceFactoryBean<BasicX509Credential>- Overrides:
isSingletonin classAbstractFactoryBean<BasicX509Credential>
-
getEntityCertificate
return the explicitly configured entity certificate..- Specified by:
getEntityCertificatein classAbstractX509CredentialFactoryBean- Returns:
- the certificate, or none if not configured.
-
getCertificates
Get the configured certificates. This MUST include the entity certificate if it was configured.- Specified by:
getCertificatesin classAbstractX509CredentialFactoryBean- Returns:
- the certificates.
-
getPrivateKey
Get the configured private key.- Specified by:
getPrivateKeyin classAbstractX509CredentialFactoryBean- Returns:
- the key or null if non configured
-
getCRLs
Get the configured CRL list.- Specified by:
getCRLsin classAbstractX509CredentialFactoryBean- Returns:
- the crls or null