com.ibm.commerce.payment.utils
Class PMClientAuthenticator

java.lang.Object
  |
  +--com.ibm.commerce.payment.utils.PMClientAuthenticator

public class PMClientAuthenticator
extends java.lang.Object

The class PMClientAuthenticator represents an object that knows how to obtain authentication for a PMClient to use with operations against WebSphere Commerce Payments.

When authentication is required for a PMClient operation, the client calls the static method getPasswordAuthentication() to obtain a PasswordAuthentication object. The PasswordAuthentication object contains a userName and password the WebSphere Commerce PMClient instance could use to issue commands to WebSphere Commerce Payments.


Field Summary
static java.lang.String CLASSNAME
          The name of this class.
 
Constructor Summary
PMClientAuthenticator()
          PMClientAuthenticator default constructor.
 
Method Summary
static void clearPassword(java.net.PasswordAuthentication authentication)
          Clears the password field of the PasswordAuthentication object.
static java.net.PasswordAuthentication getPasswordAuthentication()
          Returns the PasswordAuthentication object with the user name and password that a WebSphere Commerce PMClient instance could use when issuing commands to WebSphere Commerce Payments.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLASSNAME

public static final java.lang.String CLASSNAME
The name of this class.
Constructor Detail

PMClientAuthenticator

public PMClientAuthenticator()
PMClientAuthenticator default constructor. This constructor is not expected to be called as this class contains only static methods.
Method Detail

clearPassword

public static void clearPassword(java.net.PasswordAuthentication authentication)
Clears the password field of the PasswordAuthentication object.
Parameters:
authentication - The PasswordAuthentication object whose password field is to be cleared by setting each character to '*'.

getPasswordAuthentication

public static java.net.PasswordAuthentication getPasswordAuthentication()
                                                                 throws ECException
Returns the PasswordAuthentication object with the user name and password that a WebSphere Commerce PMClient instance could use when issuing commands to WebSphere Commerce Payments.
Returns:
The PasswordAuthentication object
Throws:
ECException - If the PasswordAuthentication object cannot be returned.