Class AbstractWsPasswordCallbackHandler
- All Implemented Interfaces:
CallbackHandler
- Direct Known Subclasses:
KeyStoreCallbackHandler
,SimplePasswordValidationCallbackHandler
,SpringSecurityPasswordValidationCallbackHandler
CallbackHandler
implementations that handle
WSPasswordCallback
callbacks.- Since:
- 2.3.0
- Author:
- Arjen Poutsma, Jamin Hitchcock
-
Field Summary
Fields inherited from class org.springframework.ws.soap.security.callback.AbstractCallbackHandler
logger
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
handleCleanup
(CleanupCallback callback) Invoked when aCleanupCallback
is passed toAbstractCallbackHandler.handle(Callback[])
.protected void
handleCustomToken
(org.apache.wss4j.common.ext.WSPasswordCallback callback) Invoked when the callback has aWSPasswordCallback.CUSTOM_TOKEN
usage.protected void
handleDecrypt
(org.apache.wss4j.common.ext.WSPasswordCallback callback) Invoked when the callback has aWSPasswordCallback.DECRYPT
usage.protected final void
handleInternal
(Callback callback) HandlesWSPasswordCallback
callbacks.protected void
handleSecretKey
(org.apache.wss4j.common.ext.WSPasswordCallback callback) Invoked when the callback has aWSPasswordCallback.SECRET_KEY
usage.protected void
handleSecurityContextToken
(org.apache.wss4j.common.ext.WSPasswordCallback callback) Invoked when the callback has aWSPasswordCallback.SECURITY_CONTEXT_TOKEN
usage.protected void
handleSignature
(org.apache.wss4j.common.ext.WSPasswordCallback callback) Invoked when the callback has aWSPasswordCallback.SIGNATURE
usage.protected void
handleUsernameToken
(org.apache.wss4j.common.ext.WSPasswordCallback callback) Invoked when the callback has aWSPasswordCallback.USERNAME_TOKEN
usage.protected void
Invoked when aUsernameTokenPrincipalCallback
is passed toAbstractCallbackHandler.handle(Callback[])
.Methods inherited from class org.springframework.ws.soap.security.callback.AbstractCallbackHandler
handle
-
Constructor Details
-
AbstractWsPasswordCallbackHandler
public AbstractWsPasswordCallbackHandler()
-
-
Method Details
-
handleInternal
protected final void handleInternal(Callback callback) throws IOException, UnsupportedCallbackException HandlesWSPasswordCallback
callbacks. Inspects the callbackusage
code, and calls the varioushandle*
template methods.- Specified by:
handleInternal
in classAbstractCallbackHandler
- Parameters:
callback
- the callback- Throws:
IOException
- in case of I/O errorsUnsupportedCallbackException
- when the callback is not supported
-
handleDecrypt
protected void handleDecrypt(org.apache.wss4j.common.ext.WSPasswordCallback callback) throws IOException, UnsupportedCallbackException Invoked when the callback has aWSPasswordCallback.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
. -
handleUsernameToken
protected void handleUsernameToken(org.apache.wss4j.common.ext.WSPasswordCallback callback) throws IOException, UnsupportedCallbackException Invoked when the callback has aWSPasswordCallback.USERNAME_TOKEN
usage.This method is invoked when WSS4J needs the password to fill in or to verify a UsernameToken.
Default implementation throws an
UnsupportedCallbackException
. -
handleSignature
protected void handleSignature(org.apache.wss4j.common.ext.WSPasswordCallback callback) throws IOException, UnsupportedCallbackException Invoked when the callback has aWSPasswordCallback.SIGNATURE
usage.This method is invoked when WSS4J needs the password to get the private key of the
identifier
(username) from the keystore. WSS4J uses this private key to produce a signature. The signature verfication uses the public key to verfiy the signature.Default implementation throws an
UnsupportedCallbackException
. -
handleSecurityContextToken
protected void handleSecurityContextToken(org.apache.wss4j.common.ext.WSPasswordCallback callback) throws IOException, UnsupportedCallbackException Invoked when the callback has aWSPasswordCallback.SECURITY_CONTEXT_TOKEN
usage.This method is invoked when WSS4J needs the key to to be associated with a SecurityContextToken.
Default implementation throws an
UnsupportedCallbackException
. -
handleCustomToken
protected void handleCustomToken(org.apache.wss4j.common.ext.WSPasswordCallback callback) throws IOException, UnsupportedCallbackException Invoked when the callback has aWSPasswordCallback.CUSTOM_TOKEN
usage.Default implementation throws an
UnsupportedCallbackException
. -
handleSecretKey
protected void handleSecretKey(org.apache.wss4j.common.ext.WSPasswordCallback callback) throws IOException, UnsupportedCallbackException Invoked when the callback has aWSPasswordCallback.SECRET_KEY
usage.Default implementation throws an
UnsupportedCallbackException
. -
handleCleanup
protected void handleCleanup(CleanupCallback callback) throws IOException, UnsupportedCallbackException Invoked when aCleanupCallback
is passed toAbstractCallbackHandler.handle(Callback[])
.Default implementation throws an
UnsupportedCallbackException
. -
handleUsernameTokenPrincipal
protected void handleUsernameTokenPrincipal(UsernameTokenPrincipalCallback callback) throws IOException, UnsupportedCallbackException Invoked when aUsernameTokenPrincipalCallback
is passed toAbstractCallbackHandler.handle(Callback[])
.Default implementation throws an
UnsupportedCallbackException
.
-