com.ibm.wsspi.wssecurity.auth.callback
Interface CallbackHandlerFactory

All Superinterfaces:
Initializable
All Known Implementing Classes:
CallbackHandlerFactoryImpl

public interface CallbackHandlerFactory
extends Initializable

A factory for CallbackHandler in WS-Security toolkit. Developers who are providing CallbackHandler classes to the toolkit must implement this interface. WS-Security runtime instantiates the implementation class and passes the authentication information from <wsse:Security> header to CallbackHandlerFactory class through the setXXX methods. Then newCallbackHandler method is invoked to obtain CallbackHandler object.


Method Summary
 javax.security.auth.callback.CallbackHandler newCallbackHandler()
          Returns a CallbackHandler object.
 void setPassword(char[] password)
          Sets a password in the <UsernameToken> element.
 void setProperties(java.util.Map properties)
          Sets a Map object which contains name-value pairs in configuration XMI files.
 void setRealm(java.lang.String realm)
          Sets a realm name.
 void setSOAPMessage(org.w3c.dom.Document SOAPMessage)
          Sets an entire SOAP message.
 void setTokenBytes(byte[] tokenBytes)
          Sets a decoded byte array in the <BinarySecurityToken> element.
 void setUsername(java.lang.String username)
          Sets an username in the <UsernameToken> element.
 void setXMLToken(org.w3c.dom.Element xmlToken)
          Sets a custom XML token.
 
Methods inherited from interface com.ibm.wsspi.wssecurity.Initializable
init
 

Method Detail

setUsername

public void setUsername(java.lang.String username)
Sets an username in the <UsernameToken> element.
Parameters:
username - An username.

setRealm

public void setRealm(java.lang.String realm)
Sets a realm name. This method is reserved for future use.
Parameters:
realm - A realm name.

setPassword

public void setPassword(char[] password)
Sets a password in the <UsernameToken> element.
Parameters:
password - A password.

setTokenBytes

public void setTokenBytes(byte[] tokenBytes)
Sets a decoded byte array in the <BinarySecurityToken> element.
Parameters:
tokenBytes - A decoded byte array.

setXMLToken

public void setXMLToken(org.w3c.dom.Element xmlToken)
Sets a custom XML token.
Parameters:
xmlToken - A custom XML token.

setSOAPMessage

public void setSOAPMessage(org.w3c.dom.Document SOAPMessage)
Sets an entire SOAP message.
Parameters:
message - An entire SOAP message.

setProperties

public void setProperties(java.util.Map properties)
Sets a Map object which contains name-value pairs in configuration XMI files. They corresponds to LoginMapping/Property elements.
Parameters:
properties - A Map object which contains name-value pairs.

newCallbackHandler

public javax.security.auth.callback.CallbackHandler newCallbackHandler()
Returns a CallbackHandler object. This method is invoked by WS-Security runtime after setXXX methods are invoked.
Returns:
a CallbackHandler object.