public class PrivateKeyFactoryBean extends Object implements org.springframework.beans.factory.FactoryBean<PrivateKey>
PrivateKey from a Resource.
This factory bean supports encrypted and non-encrypted PKCS8, DER, or PEM private key encoded resources.| Modifier and Type | Field and Description |
|---|---|
private PrivateKey |
key
The singleton instance of the private key produced by this factory.
|
private String |
keyPass
Password for the private key.
|
private org.springframework.core.io.Resource |
resource
Private key resource.
|
| Constructor and Description |
|---|
PrivateKeyFactoryBean() |
| Modifier and Type | Method and Description |
|---|---|
PrivateKey |
getObject() |
Class<?> |
getObjectType() |
boolean |
isSingleton() |
void |
setPrivateKeyPassword(String password)
Sets the password for the private key.
|
void |
setResource(org.springframework.core.io.Resource res)
Sets the resource containing the private key.
|
private org.springframework.core.io.Resource resource
private String keyPass
private PrivateKey key
public void setResource(@Nonnull org.springframework.core.io.Resource res)
res - private key resource, never nullpublic void setPrivateKeyPassword(@Nullable String password)
password - password for the private key, may be null if the key is not encryptedpublic PrivateKey getObject() throws Exception
getObject in interface org.springframework.beans.factory.FactoryBean<PrivateKey>Exception@Nonnull public Class<?> getObjectType()
getObjectType in interface org.springframework.beans.factory.FactoryBean<PrivateKey>public boolean isSingleton()
isSingleton in interface org.springframework.beans.factory.FactoryBean<PrivateKey>Copyright © 1999–2019 Shibboleth Consortium. All rights reserved.