Hi
I am using webtop 6.5sp2 and jdk 1.5.
I have configured LDAP for webtop authentication.
After particular wrong attempt the user credentials gets locked. But in the webtop login page the error message displayed is "we're sorry, authentication failed". If I enter wrong credentials the same message is shown.
I want to customise this error message such that, if the account gets locked or the credential entered is wrong then the proper error message should be such as "account locked" or "invalid credentials".
I tried in login.java but I could not find where the changes has to be done.
In Login.java I found that
protected String getLocalizedError(String strErrorMsg)
{
String strResult = null;
try
{
if ((strErrorMsg != null) && (strErrorMsg.length() > 0))
{
if (strErrorMsg.indexOf("[DM_USER_E_NOT_DOCUMENTUM_USER]") >= 0)
{
strResult = getString("MSG_LOGIN_ERROR");
}
else if (strErrorMsg.indexOf("[DM_SESSION_E_AUTH_FAIL]") >= 0)
{
strResult = getString("MSG_LOGIN_ERROR");
}
else if (strErrorMsg.indexOf("[DM_SESSION_E_START_FAIL]") >= 0)
{
strResult = getString("MSG_SESSION_START_FAIL", new Object[] { this.m_strUsername, this.m_strDocbase });
}
else if (strErrorMsg.indexOf("[DM_SESSION_E_RESTRICTED_ACCESS]") >= 0)
{
strResult = getString("MSG_SESSION_RESTRICTED_ACCESS", new Object[] { this.m_strUsername, this.m_strDocbase });
}
else if (strErrorMsg.indexOf("[DM_DOCBROKER_E_REQUEST_FAILED_E]") >= 0)
{
strResult = getString("MSG_DOCBROKER_E_REQUEST_FAILED");
}
else
{
strResult = getServerError(strErrorMsg);
}
}
}
catch (Exception e)
{
}
return strResult;
}
For account lock and wrong credentials the same exception is thrown. i.e., "[DM_SESSION_E_AUTH_FAIL]". I want to change the exception thrown.
Can any one help me to achieve this.
Thanks
Nitin