java.lang.Object | +--CacheableCommandImpl | +--com.ibm.commerce.command.AbstractECTargetableCommand | +--com.ibm.commerce.command.TaskCommandImpl | +--com.ibm.commerce.security.commands.DBAuthenticationCmdImpl
If the server is configured to authenticate against the database, this task command will be called to perform either authentication or an update.
Before executing this task command, the methods listed below must be invoked.
setEnciphereMerchantKey or setMerchantKey setLogonId setPassword
If the setUpdateFlag is called, then upon execution of this task command, the credentials set are updated in the database.
If the setUpdateFlag is not called, upon execution of this task command, verification of the credentials is performed. To determine whether the authentication was successful, call isValidCredentials.
Error View Task: DBAuthenticationErrorView
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. DBAuthenticationCmd |
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 | |
---|---|
DBAuthenticationCmdImpl() |
Method Summary | |
---|---|
protected
static byte[] |
formatPassword(byte[] bytePassword) Formats the password such that it in a common format across databases and operating systems. |
protected
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() Retrieves the password to be used for authentication with the new logon ID. |
protected
boolean |
isPasswordTemporary() Indicates whether the password is temporary. |
protected
boolean |
isUpdatePending() Indicates whether the password should be verified against an existing one in the database or if the password should be updated in the database. |
boolean |
isValidCredentials() Sets a boolean result flag indicate if the authentication was successful. |
void |
markPasswordAsTemporary() Call this method to indicate that the updated password is temporary. |
void |
performExecute() Executes the command. |
void |
performOneWayHashAuthentication() Computes the one-way hash of the password. |
void |
performReversibleAuthentication() Encrypts the plaintext password. |
void |
setEncipheredMerchantKey(java.lang.String strEncipheredMerchantKey) Sets the enciphered merchant key to be used in the encryption of the password. |
void |
setLogonId(java.lang.String strLogonId) Sets the logon ID under which the current user wishes to logon. |
void |
setMerchantKey(java.lang.String strMerchantKey) Sets the merchant key to be used in the encryption of the password. |
void |
setPassword(java.lang.String strPassword) Sets the password to be used for authentication with the new logon ID. |
void |
setUpdateFlag() This method is called to indicate that instead of performing verification of the credentials, the credentials should be set in the database. |
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 |
---|
public static final java.lang.String ERRTASK_NAME
Constructor Detail |
---|
public DBAuthenticationCmdImpl()
Method Detail |
---|
protected static byte[] formatPassword(byte[] bytePassword)
bytePassword
- The password to be formatted.protected java.lang.String getLogonId()
protected java.lang.String getMerchantKey()
protected java.lang.String getPassword()
protected boolean isPasswordTemporary()
protected boolean isUpdatePending()
public boolean isValidCredentials()
isValidCredentials
in interface
DBAuthenticationCmd
public void markPasswordAsTemporary()
markPasswordAsTemporary
in interface
DBAuthenticationCmd
public void performExecute() throws ECException
performExecute
in interface
ECCommand
performExecute
in class
AbstractECTargetableCommand
ECException
public void performOneWayHashAuthentication() throws ECException
ECException
public void performReversibleAuthentication() throws ECException
ECException
public void setEncipheredMerchantKey(java.lang.String strEncipheredMerchantKey)
setEncipheredMerchantKey
in interface
DBAuthenticationCmd
strEncipheredMerchantKey
- The enciphered merchant
key.public void setLogonId(java.lang.String strLogonId)
setLogonId
in interface
DBAuthenticationCmd
public void setMerchantKey(java.lang.String strMerchantKey)
setMerchantKey
in interface
DBAuthenticationCmd
strMerchantKey
- The merchant key.public void setPassword(java.lang.String strPassword)
setPassword
in interface
DBAuthenticationCmd
strPassword
- The password.public void setUpdateFlag()
setUpdateFlag
in interface
DBAuthenticationCmd
public void validateParameters() throws ECException
validateParameters
in interface
ECCommand
validateParameters
in class
AbstractECTargetableCommand
ECException