IBM WebSphere Application ServerTM
Release 8

com.ibm.websphere.wssecurity.wssapi
Interface WSSConsumingContext


public interface WSSConsumingContext

This interface stores the components for consuming of WS-Security, such as verification, decryption, the security token and the time stamp. When the validate() method is called, all of components are validated.

  1. Generate the wssfactory instance.
  2. Generate the wssConsumingContext instance.
  3. Create the components, such as WSSVerification, WSSDecryption object, required information to validate the securitytoken, and the keyword of the time stamp.
  4. Set the components into the wssConsumingContext object.
  5. Invoke wssConsumingContext.process() method.


Field Summary
static int TIMESTAMP
          The keyword for the creation and expiration time stamp information.
 
Method Summary
 void add(java.lang.Class tokenClass, javax.security.auth.callback.CallbackHandler callbackHandler)
          Sets the security token information in order to validate the security token in the receiving SOAP message.
 void add(java.lang.Class tokenClass, javax.security.auth.callback.CallbackHandler callbackHandler, java.lang.String loginConfigName)
          Adds the security token information in order to validate the security token in the receiving SOAP message.
 void add(java.util.HashMap<java.lang.Object,java.lang.Object> customProperties)
          Adds the custom properties HashMap object
 void add(int keyword)
          Sets the keyword of the TIMESTAMP in case of requiring the time stamp in the receiving SOAP message.
 void add(WSSDecryption decryption)
          Adds the WSSDecryption object in order to decrypt the element in the receiving SOAP message.
 void add(WSSVerification verification)
          Adds the WSSVerification object in order to verify the element in the receiving SOAP message.
 void process(java.lang.Object messageContext)
          The WS-Security element is consumed after this method is called.
 

Field Detail

TIMESTAMP

static final int TIMESTAMP
The keyword for the creation and expiration time stamp information.

See Also:
Constant Field Values
Method Detail

add

void add(WSSVerification verification)
Adds the WSSVerification object in order to verify the element in the receiving SOAP message.

Parameters:
verification - verification object

add

void add(WSSDecryption decryption)
Adds the WSSDecryption object in order to decrypt the element in the receiving SOAP message.

Parameters:
decryption - decryption object

add

void add(java.lang.Class tokenClass,
         javax.security.auth.callback.CallbackHandler callbackHandler,
         java.lang.String loginConfigName)
         throws WSSException
Adds the security token information in order to validate the security token in the receiving SOAP message.

Parameters:
tokenClass - class of the security token
callbackHandler - callback handler object which the user implements javax.security.auth.callback.CallbackHandler
loginConfigName - the name of the JAAS login configuration
Throws:
WSSException - if the arguments are not valid

add

void add(java.lang.Class tokenClass,
         javax.security.auth.callback.CallbackHandler callbackHandler)
         throws WSSException
Sets the security token information in order to validate the security token in the receiving SOAP message.

Parameters:
tokenClass - class of the security token
callbackHandler - callback handler object which the user implements javax.security.auth.callback.CallbackHandler
Throws:
WSSException - if the arguments are not valid

add

void add(int keyword)
         throws WSSException
Sets the keyword of the TIMESTAMP in case of requiring the time stamp in the receiving SOAP message.

Parameters:
keyword -
Throws:
WSSException - if the keyword is not valid

add

void add(java.util.HashMap<java.lang.Object,java.lang.Object> customProperties)
Adds the custom properties HashMap object

Parameters:
map - customproperties object

process

void process(java.lang.Object messageContext)
             throws WSSException
The WS-Security element is consumed after this method is called.

Parameters:
messageContext - SOAP message context
Throws:
WSSException - if an unexcepted error occurs in processing

IBM WebSphere Application ServerTM
Release 8