public class CryptoFactoryBean extends Object implements org.springframework.beans.factory.FactoryBean<org.apache.wss4j.common.crypto.Crypto>, org.springframework.beans.factory.InitializingBean
Crypto
. Allows for strong-typed property configuration, or configuration
through Properties
.
Requires either individual properties, or the configuration
property
to be set.
org.apache.ws.security.components.crypto.Crypto
Constructor and Description |
---|
CryptoFactoryBean() |
Modifier and Type | Method and Description |
---|---|
void |
afterPropertiesSet() |
org.apache.wss4j.common.crypto.Crypto |
getObject() |
Class<org.apache.wss4j.common.crypto.Crypto> |
getObjectType() |
boolean |
isSingleton() |
void |
setConfiguration(Properties properties)
Sets the configuration of the Crypto.
|
void |
setCryptoProvider(Class<? extends org.apache.wss4j.common.crypto.Crypto> cryptoProviderClass)
Sets the
org.apache.ws.security.components.crypto.Crypto provider name. |
void |
setDefaultX509Alias(String defaultX509Alias)
Sets the alias name of the default certificate which has been specified as a property.
|
void |
setKeyStoreLocation(org.springframework.core.io.Resource location)
Sets the location of the key store to be loaded in the
org.apache.ws.security.components.crypto.Crypto
instance. |
void |
setKeyStorePassword(String password)
Sets the key store password.
|
void |
setKeyStoreProvider(String provider)
Sets the key store provider.
|
void |
setKeyStoreType(String type)
Sets the key store type.
|
void |
setTrustStorePassword(String password)
Sets the trust store password.
|
public void setConfiguration(Properties properties)
org.apache.ws.security.components.crypto.CryptoFactory#getInstance(java.util.Properties)
public void setCryptoProvider(Class<? extends org.apache.wss4j.common.crypto.Crypto> cryptoProviderClass)
org.apache.ws.security.components.crypto.Crypto
provider name. Defaults to org.apache.ws.security.components.crypto.Merlin
.
This property maps to the WSS4J org.apache.ws.security.crypto.provider
property.
cryptoProviderClass
- the crypto provider classpublic void setKeyStoreLocation(org.springframework.core.io.Resource location) throws IOException
org.apache.ws.security.components.crypto.Crypto
instance.
This property maps to the WSS4J org.apache.ws.security.crypto.merlin.file
property.
location
- the key store locationIOException
- when the resource cannot be openedpublic void setKeyStoreProvider(String provider)
This property maps to the WSS4J org.apache.ws.security.crypto.merlin.keystore.provider
property.
provider
- the key store providerpublic void setKeyStorePassword(String password)
security
.
This property maps to the WSS4J org.apache.ws.security.crypto.merlin.keystore.password
property.
password
- the key store passwordpublic void setKeyStoreType(String type)
KeyStore.getDefaultType()
.
This property maps to the WSS4J org.apache.ws.security.crypto.merlin.keystore.type
property.
type
- the key store typepublic void setTrustStorePassword(String password)
changeit
.
WSS4J crypto uses the standard J2SE trust store, i.e. $JAVA_HOME/lib/security/cacerts
.
This property maps to the WSS4J org.apache.ws.security.crypto.merlin.cacerts.password
property.
password
- the trust store passwordpublic void setDefaultX509Alias(String defaultX509Alias)
This property maps to the WSS4J org.apache.ws.security.crypto.merlin.keystore.alias
property.
defaultX509Alias
- alias name of the default X509 certificatepublic void afterPropertiesSet() throws Exception
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
Exception
public Class<org.apache.wss4j.common.crypto.Crypto> getObjectType()
getObjectType
in interface org.springframework.beans.factory.FactoryBean<org.apache.wss4j.common.crypto.Crypto>
public boolean isSingleton()
isSingleton
in interface org.springframework.beans.factory.FactoryBean<org.apache.wss4j.common.crypto.Crypto>
Copyright © 2018 Pivotal Software. All rights reserved.