com.ibm.wsspi.wssecurity.auth.callback
Class CallbackHandlerFactoryImpl

java.lang.Object
  |
  +--com.ibm.wsspi.wssecurity.auth.callback.CallbackHandlerFactoryImpl
All Implemented Interfaces:
CallbackHandlerFactory, Initializable
Direct Known Subclasses:
WSCallbackHandlerFactoryImpl

public class CallbackHandlerFactoryImpl
extends java.lang.Object
implements CallbackHandlerFactory

A CallbackHandlerFactory implementation. This will creates an CallbackHandler implementation that understands the following callbacks:

Version:
5.02
See Also:
CallbackHandlerFactory, CallbackHandler, javax.security.auth.callback.NameCallback, javax.security.auth.callback.PasswordCallback, BinaryTokenCallback, XMLTokenReceiverCallback, PropertyCallback

Field Summary
protected  org.w3c.dom.Document message
           
protected  char[] password
           
protected  java.util.Map properties
           
protected  java.lang.String realm
           
protected  byte[] tokenBytes
           
protected  java.lang.String username
           
protected  org.w3c.dom.Element xmlToken
           
 
Constructor Summary
CallbackHandlerFactoryImpl()
           
 
Method Summary
 void init(java.util.Map map)
          Initializes the object.
 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 message)
          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.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

username

protected java.lang.String username

realm

protected java.lang.String realm

password

protected char[] password

tokenBytes

protected byte[] tokenBytes

xmlToken

protected org.w3c.dom.Element xmlToken

message

protected org.w3c.dom.Document message

properties

protected java.util.Map properties
Constructor Detail

CallbackHandlerFactoryImpl

public CallbackHandlerFactoryImpl()
Method Detail

init

public void init(java.util.Map map)
          throws SoapSecurityException
Description copied from interface: Initializable
Initializes the object.
Specified by:
init in interface Initializable
Following copied from interface: com.ibm.wsspi.wssecurity.Initializable
Parameters:
map - a Map object which contains name-value pairs. These pairs are specified in <Property> elements in the configuration XMI files.

setUsername

public void setUsername(java.lang.String username)
Description copied from interface: CallbackHandlerFactory
Sets an username in the <UsernameToken> element.
Specified by:
setUsername in interface CallbackHandlerFactory
Following copied from interface: com.ibm.wsspi.wssecurity.auth.callback.CallbackHandlerFactory
Parameters:
username - An username.

setRealm

public void setRealm(java.lang.String realm)
Description copied from interface: CallbackHandlerFactory
Sets a realm name. This method is reserved for future use.
Specified by:
setRealm in interface CallbackHandlerFactory
Following copied from interface: com.ibm.wsspi.wssecurity.auth.callback.CallbackHandlerFactory
Parameters:
realm - A realm name.

setPassword

public void setPassword(char[] password)
Description copied from interface: CallbackHandlerFactory
Sets a password in the <UsernameToken> element.
Specified by:
setPassword in interface CallbackHandlerFactory
Following copied from interface: com.ibm.wsspi.wssecurity.auth.callback.CallbackHandlerFactory
Parameters:
password - A password.

setTokenBytes

public void setTokenBytes(byte[] tokenBytes)
Description copied from interface: CallbackHandlerFactory
Sets a decoded byte array in the <BinarySecurityToken> element.
Specified by:
setTokenBytes in interface CallbackHandlerFactory
Following copied from interface: com.ibm.wsspi.wssecurity.auth.callback.CallbackHandlerFactory
Parameters:
tokenBytes - A decoded byte array.

setXMLToken

public void setXMLToken(org.w3c.dom.Element xmlToken)
Description copied from interface: CallbackHandlerFactory
Sets a custom XML token.
Specified by:
setXMLToken in interface CallbackHandlerFactory
Following copied from interface: com.ibm.wsspi.wssecurity.auth.callback.CallbackHandlerFactory
Parameters:
xmlToken - A custom XML token.

setSOAPMessage

public void setSOAPMessage(org.w3c.dom.Document message)
Description copied from interface: CallbackHandlerFactory
Sets an entire SOAP message.
Specified by:
setSOAPMessage in interface CallbackHandlerFactory
Following copied from interface: com.ibm.wsspi.wssecurity.auth.callback.CallbackHandlerFactory
Parameters:
message - An entire SOAP message.

setProperties

public void setProperties(java.util.Map properties)
Description copied from interface: CallbackHandlerFactory
Sets a Map object which contains name-value pairs in configuration XMI files. They corresponds to LoginMapping/Property elements.
Specified by:
setProperties in interface CallbackHandlerFactory
Following copied from interface: com.ibm.wsspi.wssecurity.auth.callback.CallbackHandlerFactory
Parameters:
properties - A Map object which contains name-value pairs.

newCallbackHandler

public javax.security.auth.callback.CallbackHandler newCallbackHandler()
Description copied from interface: CallbackHandlerFactory
Returns a CallbackHandler object. This method is invoked by WS-Security runtime after setXXX methods are invoked.
Specified by:
newCallbackHandler in interface CallbackHandlerFactory
Following copied from interface: com.ibm.wsspi.wssecurity.auth.callback.CallbackHandlerFactory
Returns:
a CallbackHandler object.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object