Platform.getInstance().log("PasswordException in BasicAuthCredsHandler"+e);
}
}else if(endpoint instanceof FormEndpoint){
String user = request.getParameter(USER_NAME);
String pswd = request.getParameter(PASSWORD);
FormEndpoint scendpoint = (FormEndpoint)endpoint;
try {
if(scendpoint.login(user, pswd))
{
scendpoint.setUser(user);
scendpoint.setPassword(pswd);
if(getCallerType(pathInfo).equals(JS_APP)){
generateCloseScript(request, response, AUTH_ACCEPTED);
}else if(getCallerType(pathInfo).equals(JAVA_APP)){
redirectToJavaApp(request, response, AUTH_ACCEPTED );
}