com.ibm.commerce.security.commands
Class VerifyCredentialsCmdImpl

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

public class VerifyCredentialsCmdImpl
extends TaskCommandImpl
implements VerifyCredentialsCmd

Updates the input credentials in either the database, LDAP, or third party system depending on how the WCS system is configured.

Before executing this task command, the methods listed below must be invoked.

    setLogonId
    setPassword
After execution, the isValidCredentials method 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.
protected  java.lang.String istrAuthenticateUserId
          userId for authenticated user.
 
Fields inherited from class com.ibm.commerce.command. AbstractECTargetableCommand
commandContext
 
Fields inherited from interface com.ibm.commerce.security.commands. VerifyCredentialsCmd
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
VerifyCredentialsCmdImpl()
           
 
Method Summary
 java.lang.String getAuthenticateUserId()
          Retrieves the userId of the logged in user.
protected  java.lang.String getEncipheredMerchantKey()
          Retrieves the enciphered merchant key to be used in the authentication process.
 java.lang.String getLogonId()
          Retrieves the logon ID under which the current user wishes to logon.
protected  java.lang.String getPassword()
          Retrieves the password 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.
 void performExecute()
          Executes the command.
 void setLogonId(java.lang.String strLogonId)
          Set the logonId.
 void setPassword(java.lang.String strPassword)
          Set the password.
 void validateParameters()
          Validate 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

istrAuthenticateUserId

protected java.lang.String istrAuthenticateUserId
userId for authenticated user.
Constructor Detail

VerifyCredentialsCmdImpl

public VerifyCredentialsCmdImpl()
Method Detail

getAuthenticateUserId

public java.lang.String getAuthenticateUserId()
Retrieves the userId of the logged in user.
Specified by:
getAuthenticateUserId in interface VerifyCredentialsCmd
Returns:
The userId.

getEncipheredMerchantKey

protected java.lang.String getEncipheredMerchantKey()
Retrieves the enciphered merchant key to be used in the authentication process.
Returns:
The enciphered merchant key.

getLogonId

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

getPassword

protected java.lang.String getPassword()
Retrieves the password to be used for authentication with the new logon ID.
Returns:
The password.

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 returns this result flag to indicate if the authentication was successful.
Specified by:
isValidCredentials in interface VerifyCredentialsCmd
Returns:
True if authentication was successful.

performExecute

public void performExecute()
                    throws ECException
Executes the command. Updates the credentials in LDAP, DB, or third-party authentication repository, depending on how WC is configured.
Specified by:
performExecute in interface ECCommand
Overrides:
performExecute in class AbstractECTargetableCommand
Throws:
ECException

setLogonId

public void setLogonId(java.lang.String strLogonId)
Set the logonId.
Specified by:
setLogonId in interface VerifyCredentialsCmd
Parameters:
strLogonId - The new value for the logonId parameter.

setPassword

public void setPassword(java.lang.String strPassword)
Set the password.
Specified by:
setPassword in interface VerifyCredentialsCmd
Parameters:
strPassword - The new value for the password parameter.

validateParameters

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