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.
|
Constructor and Description |
---|
DBAuthenticationCmdImpl() |
Modifier and Type | Method and Description |
---|---|
protected static byte[] | formatPassword(byte[] bytePassword)
This method formats the password in a common format across databases and operating systems.
|
protected java.lang.String | getLogonId()
This method retrieves the logon ID under which the current user wishes to logon to the system.
|
protected java.lang.String | getPassword()
This method retrieves the password to use for authentication with the new logon ID.
|
protected boolean | isPasswordTemporary()
This method indicates whether the password is temporary or not.
|
protected boolean | isUpdatePending()
This method indicates whether the password should be verified against the database or if the password should be updated in the database.
|
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.
|
protected void | updateUserRegRecord(UserRegistryAccessBean abUserReg, byte[] newPassword, java.lang.String strSalt)
This method is used to update the USERREG table with the given password and salt.
|
void | validateParameters()
This method validates the parameters by ensuring that the logon ID, password, and merchant key are all non-zero length strings.
|
public static final java.lang.String COPYRIGHT
public static final java.lang.String ERRTASK_NAME
protected static byte[] formatPassword(byte[] bytePassword)
protected java.lang.String getLogonId()
protected java.lang.String getPassword()
protected boolean isPasswordTemporary()
protected boolean isUpdatePending()
public boolean isValidCredentials()
public void markPasswordAsTemporary()
public void performExecute() throws ECException
public void performOneWayHashAuthentication() throws ECException
public void performReversibleAuthentication() throws ECException
protected void updateUserRegRecord(UserRegistryAccessBean abUserReg, byte[] newPassword, java.lang.String strSalt) throws ECException, java.rmi.RemoteException, javax.ejb.CreateException, javax.ejb.FinderException, javax.naming.NamingException
public void setEncipheredMerchantKey(java.lang.String strEncipheredMerchantKey)
public void setLogonId(java.lang.String strLogonId)
public void setPassword(java.lang.String strPassword)
public void setUpdateFlag()
public void validateParameters() throws ECException