public class DBAuthenticationCmdImpl extends TaskCommandImpl implements DBAuthenticationCmd
If the WebSphere Commerce server is configured to authenticate against a database, this task command either authenticates or updates a credential set.
Before executing this task command, the methods listed below must be invoked.
If the setUpdateFlag is called, this task command updates the credentials set in the database.
If the setUpdateFlag is not called, this task command verifies the credentials when executed. To determine whether the authentication is successful, call isValidCredentials.
Error View Task: DBAuthenticationErrorView
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
COPYRIGHT
IBM Copyright statement
|
static java.lang.String |
ERRTASK_NAME
Error task name.
|
defaultCommandClassName, NAME
Constructor and Description |
---|
DBAuthenticationCmdImpl() |
Modifier and Type | Method and Description |
---|---|
boolean |
isValidCredentials()
A boolean result flag is set to indicate if the authentication
succeeds.
|
void |
markPasswordAsTemporary()
This method sets the updated password as temporary.
|
void |
performExecute()
This method executes this command.
|
void |
performOneWayHashAuthentication()
This method will be executed if the user has an one-way hashed password.
|
void |
performReversibleAuthentication()
This method will be executed if the user has a reversibly encrypted password.
|
void |
setEncipheredMerchantKey(java.lang.String strEncipheredMerchantKey)
Deprecated.
Retrieve the merchantkey by first calling
ConfigProperties.singleton().getMerchantKey()
and then call setMerchantKey(String) to set the merchant key to be used by the command. |
void |
setLogonId(java.lang.String strLogonId)
This method sets the logon ID under which the current user wishes to logon.
|
void |
setPassword(java.lang.String strPassword)
This method sets the password to use for authentication with a
new logon ID.
|
void |
setUpdateFlag()
This method is called to indicate that instead of verifying
the credentials, the credentials should be set in the database.
|
void |
validateParameters()
This method validates the parameters by ensuring that the logon ID, password, and
merchant key are all non-zero length strings.
|
accessControlCheck, checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, execute, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getObjectSize, getPostInvokeParameters, getPreInvokeParameters, getResources, getStoreId, getUser, getUserId, isReadyToCallExecute, reset, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties
executeFromCache, getCaller, getEntryInfo, getId, getSharingPolicy, postExecute, preExecute, setCaller, setObjectSize, unionDependencies, updateCache
getCommandTarget, getCommandTargetName, getTargetPolicy, hasOutputProperties, setCommandTarget, setCommandTargetName, setHasOutputProperties, setOutputProperties, setTargetPolicy
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
executeFromCache, getCaller, getEntryInfo, getId, getSharingPolicy, postExecute, preExecute, setCaller, updateCache
getCommandTarget, getCommandTargetName, hasOutputProperties, setCommandTarget, setCommandTargetName, setOutputProperties
checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getPostInvokeParameters, getPreInvokeParameters, getResources, getStoreId, getUser, getUserId, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties
public static final java.lang.String COPYRIGHT
public static final java.lang.String ERRTASK_NAME
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 interface com.ibm.websphere.command.TargetableCommand
performExecute
in class AbstractECTargetableCommand
ECException
public void performOneWayHashAuthentication() throws ECException
ECException
public void performReversibleAuthentication() throws ECException
ECException
public void setEncipheredMerchantKey(java.lang.String strEncipheredMerchantKey)
ConfigProperties.singleton().getMerchantKey()
and then call setMerchantKey(String)
to set the merchant key to be used by the command.setEncipheredMerchantKey
in interface DBAuthenticationCmd
strEncipheredMerchantKey
- The enciphered merchant key.public void setLogonId(java.lang.String strLogonId)
setLogonId
in interface DBAuthenticationCmd
strLogonId
- The logon ID.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