public abstract class AbstractWsPasswordCallbackHandler extends AbstractCallbackHandler
CallbackHandler
implementations that handle WSPasswordCallback
callbacks.logger
Constructor and Description |
---|
AbstractWsPasswordCallbackHandler() |
Modifier and Type | Method and Description |
---|---|
protected void |
handleCleanup(CleanupCallback callback)
Invoked when a
CleanupCallback is passed to AbstractCallbackHandler.handle(Callback[]) . |
protected void |
handleCustomToken(org.apache.wss4j.common.ext.WSPasswordCallback callback)
Invoked when the callback has a
WSPasswordCallback.CUSTOM_TOKEN usage. |
protected void |
handleDecrypt(org.apache.wss4j.common.ext.WSPasswordCallback callback)
Invoked when the callback has a
WSPasswordCallback.DECRYPT usage. |
protected void |
handleInternal(Callback callback)
Handles
WSPasswordCallback callbacks. |
protected void |
handleSecretKey(org.apache.wss4j.common.ext.WSPasswordCallback callback)
Invoked when the callback has a
WSPasswordCallback.SECRET_KEY usage. |
protected void |
handleSecurityContextToken(org.apache.wss4j.common.ext.WSPasswordCallback callback)
Invoked when the callback has a
WSPasswordCallback.SECURITY_CONTEXT_TOKEN usage. |
protected void |
handleSignature(org.apache.wss4j.common.ext.WSPasswordCallback callback)
Invoked when the callback has a
WSPasswordCallback.SIGNATURE usage. |
protected void |
handleUsernameToken(org.apache.wss4j.common.ext.WSPasswordCallback callback)
Invoked when the callback has a
WSPasswordCallback.USERNAME_TOKEN usage. |
protected void |
handleUsernameTokenPrincipal(UsernameTokenPrincipalCallback callback)
Invoked when a
UsernameTokenPrincipalCallback is passed to AbstractCallbackHandler.handle(Callback[]) . |
handle
protected final void handleInternal(Callback callback) throws IOException, UnsupportedCallbackException
WSPasswordCallback
callbacks. Inspects the callback usage
code, and calls the various handle*
template methods.handleInternal
in class AbstractCallbackHandler
callback
- the callbackIOException
- in case of I/O errorsUnsupportedCallbackException
- when the callback is not supportedprotected void handleDecrypt(org.apache.wss4j.common.ext.WSPasswordCallback callback) throws IOException, UnsupportedCallbackException
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
.
protected void handleUsernameToken(org.apache.wss4j.common.ext.WSPasswordCallback callback) throws IOException, UnsupportedCallbackException
WSPasswordCallback.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
.
protected void handleSignature(org.apache.wss4j.common.ext.WSPasswordCallback callback) throws IOException, UnsupportedCallbackException
WSPasswordCallback.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
.
protected void handleSecurityContextToken(org.apache.wss4j.common.ext.WSPasswordCallback callback) throws IOException, UnsupportedCallbackException
WSPasswordCallback.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
.
protected void handleCustomToken(org.apache.wss4j.common.ext.WSPasswordCallback callback) throws IOException, UnsupportedCallbackException
WSPasswordCallback.CUSTOM_TOKEN
usage.
Default implementation throws an UnsupportedCallbackException
.
protected void handleSecretKey(org.apache.wss4j.common.ext.WSPasswordCallback callback) throws IOException, UnsupportedCallbackException
WSPasswordCallback.SECRET_KEY
usage.
Default implementation throws an UnsupportedCallbackException
.
protected void handleCleanup(CleanupCallback callback) throws IOException, UnsupportedCallbackException
CleanupCallback
is passed to AbstractCallbackHandler.handle(Callback[])
.
Default implementation throws an UnsupportedCallbackException
.
protected void handleUsernameTokenPrincipal(UsernameTokenPrincipalCallback callback) throws IOException, UnsupportedCallbackException
UsernameTokenPrincipalCallback
is passed to AbstractCallbackHandler.handle(Callback[])
.
Default implementation throws an UnsupportedCallbackException
.
Copyright © 2020 Pivotal Software. All rights reserved.