I have a servlet that mimics the Domino login form. Authentication is done against LDAP through Directory Assistance.
The server first checks if the password is expired. If it hasn't expired then it goes on to authenticate the user. The authenticate process then starts from the servlet, by sending HTML that mimics the default login page for Domino, the code is below. It is not very secure.
Is there a Domino method in Java that I can call to authenticate the user from my servlet?
I was thinking about doing a POST but not sure if that would be as secure.
Any ideas?
private void logUserIntoNotes(HttpServletResponse response) throws IOException
{
String action = "/names.nsf?Login";
System.out.println("Action=" + action);
System.out.println("Username=" + username);
//System.out.println("Password=" + password);
System.out.println("RedirectTo=" + redirectTo);
response.setContentType("text/html");
ServletOutputStream out = response.getOutputStream();
out.println("<html><head><title>Login Page</title></head><body>");
out.println("Logging in. Please wait ...");
out.println("<form method=\"post\" name=\"login\" action=\"" + action + "\">");
out.println("<input type=\"hidden\" name=\"Username\" value=\"" + username + "\">");
out.println("<input type=\"hidden\" name=\"Password\" value=\"" + password + "\">");
out.println("<input type=\"hidden\" name=\"RedirectTo\" value=\"" + redirectTo + "\">");
out.println("</form>");
out.println("<SCRIPT LANGUAGE=\"JavaScript\"> document.forms[\"login\"].submit(); </SCRIPT>");
out.println("</body></html>");
}