* @return status code of the authentication; ESME_ROK if authentication
* passed
*/
private int checkIdentity(BindRequest request) {
int commandStatus = Data.ESME_ROK;
Record user = users.find(SYSTEM_ID_ATTR, request.getSystemId());
if (user != null) {
String password = user.getValue(PASSWORD_ATTR);
if (password != null) {
if (!request.getPassword().equals(password)) {
commandStatus = Data.ESME_RINVPASWD;
debug.write("system id " + request.getSystemId() + " not authenticated. Invalid password.");
display("not authenticated " + request.getSystemId() + " -- invalid password");