com.ibm.websphere.security.auth.callback
Class WSCallbackHandlerImpl

java.lang.Object
  |
  +--com.ibm.websphere.security.auth.callback.WSCallbackHandlerImpl
All Implemented Interfaces:
javax.security.auth.callback.CallbackHandler

public class WSCallbackHandlerImpl
extends java.lang.Object
implements javax.security.auth.callback.CallbackHandler

The WSCallbackHandlerImpl allows authentication data to be pushed to the login module, i.e. without prompting for the data.

Supported Callbacks:

Since:
1.0
Version:
1.0
See Also:
NameCallback, PasswordCallback, com.ibm.websphere.security.callback.WSCredTokenCallbackImpl

Constructor Summary
WSCallbackHandlerImpl(byte[] credToken)
           Push Credential Token to login module.
WSCallbackHandlerImpl(java.lang.String userName, java.lang.String password)
           Push the username and password to login module.
WSCallbackHandlerImpl(java.lang.String userName, java.lang.String realmName, java.lang.String password)
           Push the username and password to login module.
 
Method Summary
 void handle(javax.security.auth.callback.Callback[] callbacks)
           This implementation of CallbackHandler pushes the data specified in the constructor to the login module.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WSCallbackHandlerImpl

public WSCallbackHandlerImpl(java.lang.String userName,
                             java.lang.String password)

Push the username and password to login module.

Parameters:
userName - The user name of the principal.
password - The password in clear text.

WSCallbackHandlerImpl

public WSCallbackHandlerImpl(java.lang.String userName,
                             java.lang.String realmName,
                             java.lang.String password)

Push the username and password to login module. The realmName is not used.

If the realm name is IBM reserved for future, and it is not used in this release. The realm name is determined by the runtime, this constructor is same as WSCallbackHandlerImpl(String userName, String password). The realm name is ignored in this release, please use WSCallbackHandlerImpl(String userName, String password) instead.

Parameters:
userName - The user name of the principal.
realmName - The realm name (IBM reserved for future, not used in this release).
password - The password in clear text.

WSCallbackHandlerImpl

public WSCallbackHandlerImpl(byte[] credToken)

Push Credential Token to login module. The Credential Token should be treated as an opaque object. The credential token must be in the format recognized by WebSphere Secure Association Service.

Parameters:
credToken - The credential token.
Method Detail

handle

public void handle(javax.security.auth.callback.Callback[] callbacks)
            throws java.io.IOException,
                   javax.security.auth.callback.UnsupportedCallbackException

This implementation of CallbackHandler pushes the data specified in the constructor to the login module.

Specified by:
handle in interface javax.security.auth.callback.CallbackHandler
Parameters:
callbacks - An array of Callback objects provided by the underlying security service which contains the information requested to be retrieved or displayed.
Throws:
java.io.IOException - If an input or output error occurs.
javax.security.auth.callback.UnsupportedCallbackException - If the implementation of this method does not support one or more of the Callbacks specified in the callbacks parameter.


 

WebSphere is a trademark of the IBM Corporation in the United States, other countries, or both.

 

IBM is a trademark of the IBM Corporation in the United States, other countries, or both.