|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springframework.ws.soap.security.callback.AbstractCallbackHandler
org.springframework.ws.soap.security.wss4j.callback.AbstractWsPasswordCallbackHandler
public abstract class AbstractWsPasswordCallbackHandler
Abstract base class for CallbackHandler implementations that handle WSPasswordCallback callbacks.
| Field Summary |
|---|
| Fields inherited from class org.springframework.ws.soap.security.callback.AbstractCallbackHandler |
|---|
logger |
| Constructor Summary | |
|---|---|
AbstractWsPasswordCallbackHandler()
|
|
| Method Summary | |
|---|---|
protected void |
handleCleanup(CleanupCallback callback)
Invoked when a CleanupCallback is passed to AbstractCallbackHandler.handle(Callback[]). |
protected void |
handleCustomToken(org.apache.ws.security.WSPasswordCallback callback)
Invoked when the callback has a WSPasswordCallback.CUSTOM_TOKEN usage. |
protected void |
handleDecrypt(org.apache.ws.security.WSPasswordCallback callback)
Invoked when the callback has a WSPasswordCallback.DECRYPT usage. |
protected void |
handleEncryptedKeyToken(javax.security.auth.callback.Callback callback)
Invoked when the callback has a WSPasswordCallback.ENCRYPTED_KEY_TOKEN usage. |
protected void |
handleInternal(javax.security.auth.callback.Callback callback)
Handles WSPasswordCallback callbacks. |
protected void |
handleKeyName(org.apache.ws.security.WSPasswordCallback callback)
Invoked when the callback has a WSPasswordCallback.KEY_NAME usage. |
protected void |
handleSecurityContextToken(org.apache.ws.security.WSPasswordCallback callback)
Invoked when the callback has a WSPasswordCallback.SECURITY_CONTEXT_TOKEN usage. |
protected void |
handleSignature(org.apache.ws.security.WSPasswordCallback callback)
Invoked when the callback has a WSPasswordCallback.SIGNATURE usage. |
protected void |
handleUsernameToken(org.apache.ws.security.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[]). |
protected void |
handleUsernameTokenUnknown(org.apache.ws.security.WSPasswordCallback callback)
Invoked when the callback has a WSPasswordCallback.USERNAME_TOKEN_UNKNOWN usage. |
| 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 AbstractWsPasswordCallbackHandler()
| Method Detail |
|---|
protected final void handleInternal(javax.security.auth.callback.Callback callback)
throws java.io.IOException,
javax.security.auth.callback.UnsupportedCallbackException
WSPasswordCallback callbacks. Inspects the callback usage
code, and calls the various handle* template methods.
handleInternal in class AbstractCallbackHandlercallback - the callback
java.io.IOException - in case of I/O errors
javax.security.auth.callback.UnsupportedCallbackException - when the callback is not supported
protected void handleDecrypt(org.apache.ws.security.WSPasswordCallback callback)
throws java.io.IOException,
javax.security.auth.callback.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.
java.io.IOException
javax.security.auth.callback.UnsupportedCallbackException
protected void handleUsernameToken(org.apache.ws.security.WSPasswordCallback callback)
throws java.io.IOException,
javax.security.auth.callback.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.
java.io.IOException
javax.security.auth.callback.UnsupportedCallbackException
protected void handleSignature(org.apache.ws.security.WSPasswordCallback callback)
throws java.io.IOException,
javax.security.auth.callback.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.
java.io.IOException
javax.security.auth.callback.UnsupportedCallbackException
protected void handleKeyName(org.apache.ws.security.WSPasswordCallback callback)
throws java.io.IOException,
javax.security.auth.callback.UnsupportedCallbackException
WSPasswordCallback.KEY_NAME usage.
This method is invoked when WSS4J needs the key associated with the identifier. WSS4J uses this key to encrypt or decrypt parts of the SOAP request. Note, the key must match the
symmetric encryption/decryption algorithm specified (refer to WSHandlerConstants.ENC_SYM_ALGO).
Default implementation throws an UnsupportedCallbackException.
java.io.IOException
javax.security.auth.callback.UnsupportedCallbackException
protected void handleUsernameTokenUnknown(org.apache.ws.security.WSPasswordCallback callback)
throws java.io.IOException,
javax.security.auth.callback.UnsupportedCallbackException
WSPasswordCallback.USERNAME_TOKEN_UNKNOWN usage.
This method is invoked for a not specified password type or a plain text password type. Only the password is set. The callback class now may check if the username and password
match. If they don't match, the subclass should throw an exception.
Default implementation throws an UnsupportedCallbackException.
java.io.IOException
javax.security.auth.callback.UnsupportedCallbackException
protected void handleSecurityContextToken(org.apache.ws.security.WSPasswordCallback callback)
throws java.io.IOException,
javax.security.auth.callback.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.
java.io.IOException
javax.security.auth.callback.UnsupportedCallbackException
protected void handleCustomToken(org.apache.ws.security.WSPasswordCallback callback)
throws java.io.IOException,
javax.security.auth.callback.UnsupportedCallbackException
WSPasswordCallback.CUSTOM_TOKEN usage.
Default implementation throws an UnsupportedCallbackException.
java.io.IOException
javax.security.auth.callback.UnsupportedCallbackException
protected void handleEncryptedKeyToken(javax.security.auth.callback.Callback callback)
throws java.io.IOException,
javax.security.auth.callback.UnsupportedCallbackException
WSPasswordCallback.ENCRYPTED_KEY_TOKEN usage.
Default implementation throws an UnsupportedCallbackException.
java.io.IOException
javax.security.auth.callback.UnsupportedCallbackException
protected void handleCleanup(CleanupCallback callback)
throws java.io.IOException,
javax.security.auth.callback.UnsupportedCallbackException
CleanupCallback is passed to AbstractCallbackHandler.handle(Callback[]).
Default implementation throws an UnsupportedCallbackException.
java.io.IOException
javax.security.auth.callback.UnsupportedCallbackException
protected void handleUsernameTokenPrincipal(UsernameTokenPrincipalCallback callback)
throws java.io.IOException,
javax.security.auth.callback.UnsupportedCallbackException
UsernameTokenPrincipalCallback is passed to AbstractCallbackHandler.handle(Callback[]).
Default implementation throws an UnsupportedCallbackException.
java.io.IOException
javax.security.auth.callback.UnsupportedCallbackException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||