|
Spring Web Services Framework | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.ws.soap.security.callback.AbstractCallbackHandler org.springframework.ws.soap.security.wss4j.callback.AbstractWsPasswordCallbackHandler org.springframework.ws.soap.security.wss4j.callback.KeyStoreCallbackHandler
public class KeyStoreCallbackHandler
Callback handler that uses Java Security KeyStore
s to handle cryptographic callbacks. Allows for
specific key stores to be set for various cryptographic operations.
KeyStoreFactoryBean
Field Summary |
---|
Fields inherited from class org.springframework.ws.soap.security.callback.AbstractCallbackHandler |
---|
logger |
Constructor Summary | |
---|---|
KeyStoreCallbackHandler()
|
Method Summary | |
---|---|
void |
afterPropertiesSet()
|
protected void |
handleDecrypt(WSPasswordCallback callback)
Invoked when the callback has a WSPasswordCallback.DECRYPT usage. |
protected void |
handleSecretKey(WSPasswordCallback callback)
Invoked when the callback has a WSPasswordCallback.SECRET_KEY usage. |
protected void |
loadDefaultKeyStore()
Loads the key store indicated by system properties. |
void |
setKeyStore(KeyStore keyStore)
Sets the key store to use if a symmetric key name is embedded. |
void |
setPrivateKeyPassword(String privateKeyPassword)
Sets the password used to retrieve private keys from the keystore. |
void |
setSymmetricKeyPassword(String symmetricKeyPassword)
Sets the password used to retrieve keys from the symmetric keystore. |
Methods inherited from class org.springframework.ws.soap.security.wss4j.callback.AbstractWsPasswordCallbackHandler |
---|
handleCleanup, handleCustomToken, handleInternal, handleSecurityContextToken, handleSignature, handleUsernameToken, handleUsernameTokenPrincipal |
Methods inherited from class org.springframework.ws.soap.security.callback.AbstractCallbackHandler |
---|
handle |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public KeyStoreCallbackHandler()
Method Detail |
---|
public void setKeyStore(KeyStore keyStore)
public void setPrivateKeyPassword(String privateKeyPassword)
public void setSymmetricKeyPassword(String symmetricKeyPassword)
setPrivateKeyPassword(String)
public void afterPropertiesSet() throws Exception
afterPropertiesSet
in interface InitializingBean
Exception
protected void handleDecrypt(WSPasswordCallback callback) throws IOException, UnsupportedCallbackException
AbstractWsPasswordCallbackHandler
WSPasswordCallback.DECRYPT
usage.
This method is invoked when WSS4J needs a password to get the private key of the identifier
(username) from the keystore. WSS4J uses this private key to
decrypt the session (symmetric) key. Because the encryption method uses the public key to encrypt the session key
it needs no password (a public key is usually not protected by a password).
Default implementation throws an UnsupportedCallbackException
.
handleDecrypt
in class AbstractWsPasswordCallbackHandler
IOException
UnsupportedCallbackException
protected void handleSecretKey(WSPasswordCallback callback) throws IOException, UnsupportedCallbackException
AbstractWsPasswordCallbackHandler
WSPasswordCallback.SECRET_KEY
usage.
Default implementation throws an UnsupportedCallbackException
.
handleSecretKey
in class AbstractWsPasswordCallbackHandler
IOException
UnsupportedCallbackException
protected void loadDefaultKeyStore()
KeyStoreUtils.loadDefaultKeyStore()
.
|
Spring Web Services Framework | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |