Class PrivateKeyFactoryBean
java.lang.Object
net.shibboleth.shared.spring.security.factory.PrivateKeyFactoryBean
- All Implemented Interfaces:
FactoryBean<PrivateKey>
Spring bean factory for producing a
PrivateKey from a Resource.
This factory bean supports encrypted and non-encrypted PKCS8, DER, or PEM private key encoded resources.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate PrivateKeyThe singleton instance of the private key produced by this factory.private StringPassword for the private key.private ResourcePrivate key resource.Fields inherited from interface org.springframework.beans.factory.FactoryBean
OBJECT_TYPE_ATTRIBUTE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionClass<?>booleanvoidsetPrivateKeyPassword(String password) Sets the password for the private key.voidsetResource(Resource res) Sets the resource containing the private key.
-
Field Details
-
resource
Private key resource. -
keyPass
Password for the private key. -
key
The singleton instance of the private key produced by this factory.
-
-
Constructor Details
-
PrivateKeyFactoryBean
public PrivateKeyFactoryBean()
-
-
Method Details
-
setResource
Sets the resource containing the private key.- Parameters:
res- private key resource, nevernull
-
setPrivateKeyPassword
Sets the password for the private key.- Parameters:
password- password for the private key, may be null if the key is not encrypted
-
getObject
- Specified by:
getObjectin interfaceFactoryBean<PrivateKey>- Throws:
Exception
-
getObjectType
- Specified by:
getObjectTypein interfaceFactoryBean<PrivateKey>
-
isSingleton
public boolean isSingleton()- Specified by:
isSingletonin interfaceFactoryBean<PrivateKey>
-