com.ibm.commerce.security.commands
Class PaymentManagerVerifyCredentialsCmdImpl

java.lang.Object
  |
  +--CacheableCommandImpl
        |
        +--com.ibm.commerce.command.AbstractECTargetableCommand
              |
              +--com.ibm.commerce.command.TaskCommandImpl
                    |
                    +--com.ibm.commerce.security.commands.PaymentManagerVerifyCredentialsCmdImpl
All Implemented Interfaces:
ECCommand, ECTargetableCommand, PaymentManagerVerifyCredentialsCmd, TaskCommand

public class PaymentManagerVerifyCredentialsCmdImpl
extends TaskCommandImpl
implements PaymentManagerVerifyCredentialsCmd

This command will take the input credentials and update them in either the database, LDAP, or third party system depending on how the WCS system was configured.

Before executing this task command the following sets should be performed:

    setLogonId
    setPassword
After execution the isValidCredentials command should be called to see whether the credentials were valid or not. Error View Task: VerifyCredentialsErrorView
See Also:
Serialized Form

Field Summary
static java.lang.String ERRTASK_NAME
          Error task name.
 
Fields inherited from class com.ibm.commerce.command. AbstractECTargetableCommand
commandContext
 
Fields inherited from interface com.ibm.commerce.security.commands. PaymentManagerVerifyCredentialsCmd
COPYRIGHT, defaultCommandClassName, NAME
 
Fields inherited from interface com.ibm.commerce.command. ECTargetableCommand
COPYRIGHT
 
Fields inherited from interface com.ibm.commerce.command. ECCommand
defaultCommandClassName
 
Constructor Summary
PaymentManagerVerifyCredentialsCmdImpl()
           
 
Method Summary
protected static byte[] formatPassword(byte[] bytePassword)
          Formats the password supplied.
 java.lang.String getLogonId()
          Retrieve the Logon ID under which the current user wishes to logon.
protected  java.lang.String getMerchantKey()
          Retrieves the Merchant Key to be used in the authentication process.
protected  java.lang.String getPassword()
          Retrieve the Password to be used for authentication with the new Logon ID.
  UserRegistryAccessBean getUserRegistryAccessBean()
          Retrieve the UserRegistryAccessBean to be used for authentication with the new Logon ID.
 boolean isValidCredentials()
          After the this command task is executed, a boolean result flag will be set to indicate if the authentication was successful.
protected  boolean isValidPasswordHash()
          Method isValidPasswordHash.
 void performExecute()
          Checks to make sure that the password supplied is a valid password password hash, then delegates to the VerifyCredentialsCmd to determine if the logonId/ password combination is valid.
 void setLogonId(java.lang.String strLogonId)
          Sets the Logon ID under which the current user wishes to logon.
 void setPassword(java.lang.String strPassword)
          Sets the Password to be used for authentication with the new Logon ID.
 void validateParameters()
          Validates the parameters.
 
Methods inherited from class com.ibm.commerce.command. AbstractECTargetableCommand
accessControlCheck, checkIsAllowed, checkParameters, checkResourcePermission, createCommandExecutionEvent, execute, finalize, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getResources, getStoreId, getUser, getUserId, isReadyToCallExecute, reset, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ERRTASK_NAME

public static final java.lang.String ERRTASK_NAME
Error task name.
See Also:
Constant Field Values
Constructor Detail

PaymentManagerVerifyCredentialsCmdImpl

public PaymentManagerVerifyCredentialsCmdImpl()
Method Detail

formatPassword

protected static byte[] formatPassword(byte[] bytePassword)
Formats the password supplied.
Parameters:
bytePassword - Unformatted password.
Returns:
byte[] Formatted password.

getLogonId

public java.lang.String getLogonId()
Retrieve the Logon ID under which the current user wishes to logon.
Specified by:
getLogonId in interface PaymentManagerVerifyCredentialsCmd
Returns:
The Logon ID.

getMerchantKey

protected java.lang.String getMerchantKey()
Retrieves the Merchant Key to be used in the authentication process.
Returns:
The Merchant Key.

getPassword

protected java.lang.String getPassword()
Retrieve the Password to be used for authentication with the new Logon ID.
Returns:
The Password.

getUserRegistryAccessBean

public UserRegistryAccessBean getUserRegistryAccessBean()
Retrieve the UserRegistryAccessBean to be used for authentication with the new Logon ID.
Specified by:
getUserRegistryAccessBean in interface PaymentManagerVerifyCredentialsCmd
Returns:
The UserRegistryAccessBean.

isValidCredentials

public boolean isValidCredentials()
After the this command task is executed, a boolean result flag will be set to indicate if the authentication was successful. This method will return the this result flag to indicate if the authentication was successful.
Specified by:
isValidCredentials in interface PaymentManagerVerifyCredentialsCmd
Returns:
True if authentication was successful.

isValidPasswordHash

protected boolean isValidPasswordHash()
                               throws ECException
Method isValidPasswordHash.
Returns:
boolean true if password is hashed.
Throws:
ECException

performExecute

public void performExecute()
                    throws ECException
Checks to make sure that the password supplied is a valid password password hash, then delegates to the VerifyCredentialsCmd to determine if the logonId/ password combination is valid.
Specified by:
performExecute in interface ECCommand
Overrides:
performExecute in class AbstractECTargetableCommand
Throws:
ECException

setLogonId

public void setLogonId(java.lang.String strLogonId)
Sets the Logon ID under which the current user wishes to logon.
Specified by:
setLogonId in interface PaymentManagerVerifyCredentialsCmd

setPassword

public void setPassword(java.lang.String strPassword)
Sets the Password to be used for authentication with the new Logon ID.
Specified by:
setPassword in interface PaymentManagerVerifyCredentialsCmd
Parameters:
strPassword - The Password.

validateParameters

public void validateParameters()
                        throws ECException
Validates the parameters. Ensures that the logonId and password are both non-zero length Strings.
Specified by:
validateParameters in interface ECCommand
Overrides:
validateParameters in class AbstractECTargetableCommand
Throws:
ECException