Class AbstractWsPasswordCallbackHandler
- All Implemented Interfaces:
CallbackHandler
- Direct Known Subclasses:
KeyStoreCallbackHandler,SimplePasswordValidationCallbackHandler,SpringSecurityPasswordValidationCallbackHandler
CallbackHandler
implementations that handle WSPasswordCallback callbacks.- Since:
- 2.3.0
-
Field Summary
Fields inherited from class org.springframework.ws.soap.security.callback.AbstractCallbackHandler
logger -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidhandleCleanup(CleanupCallback callback) Invoked when aCleanupCallbackis passed toAbstractCallbackHandler.handle(Callback[]).protected voidhandleCustomToken(org.apache.wss4j.common.ext.WSPasswordCallback callback) Invoked when the callback has aWSPasswordCallback.CUSTOM_TOKENusage.protected voidhandleDecrypt(org.apache.wss4j.common.ext.WSPasswordCallback callback) Invoked when the callback has aWSPasswordCallback.DECRYPTusage.protected final voidhandleInternal(Callback callback) HandlesWSPasswordCallbackcallbacks.protected voidhandleSecretKey(org.apache.wss4j.common.ext.WSPasswordCallback callback) Invoked when the callback has aWSPasswordCallback.SECRET_KEYusage.protected voidhandleSecurityContextToken(org.apache.wss4j.common.ext.WSPasswordCallback callback) Invoked when the callback has aWSPasswordCallback.SECURITY_CONTEXT_TOKENusage.protected voidhandleSignature(org.apache.wss4j.common.ext.WSPasswordCallback callback) Invoked when the callback has aWSPasswordCallback.SIGNATUREusage.protected voidhandleUsernameToken(org.apache.wss4j.common.ext.WSPasswordCallback callback) Invoked when the callback has aWSPasswordCallback.USERNAME_TOKENusage.protected voidInvoked when aUsernameTokenPrincipalCallbackis 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 HandlesWSPasswordCallbackcallbacks. Inspects the callbackusagecode, and calls the varioushandle*template methods.- Specified by:
handleInternalin 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.DECRYPTusage.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_TOKENusage.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.SIGNATUREusage.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_TOKENusage.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_TOKENusage.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_KEYusage.Default implementation throws an
UnsupportedCallbackException. -
handleCleanup
protected void handleCleanup(CleanupCallback callback) throws IOException, UnsupportedCallbackException Invoked when aCleanupCallbackis passed toAbstractCallbackHandler.handle(Callback[]).Default implementation throws an
UnsupportedCallbackException. -
handleUsernameTokenPrincipal
protected void handleUsernameTokenPrincipal(UsernameTokenPrincipalCallback callback) throws IOException, UnsupportedCallbackException Invoked when aUsernameTokenPrincipalCallbackis passed toAbstractCallbackHandler.handle(Callback[]).Default implementation throws an
UnsupportedCallbackException.
-