Author: alain_defrance
Date: 2011-08-14 05:58:15 -0400 (Sun, 14 Aug 2011)
New Revision: 7102
Modified:
components/wci/trunk/wci/src/main/java/org/gatein/wci/security/WCILoginController.java
Log:
Apply patch related to navigation controller changes
Modified:
components/wci/trunk/wci/src/main/java/org/gatein/wci/security/WCILoginController.java
===================================================================
---
components/wci/trunk/wci/src/main/java/org/gatein/wci/security/WCILoginController.java 2011-08-14
09:55:22 UTC (rev 7101)
+++
components/wci/trunk/wci/src/main/java/org/gatein/wci/security/WCILoginController.java 2011-08-14
09:58:15 UTC (rev 7102)
@@ -37,9 +37,6 @@
/** . */
private static final Logger log = LoggerFactory.getLogger(WCILoginController.class);
- /** . */
- protected Credentials credentials;
-
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws
ServletException, IOException
{
String username = req.getParameter("username");
@@ -52,23 +49,13 @@
) return;
//
- if (username == null)
- {
- log.error("Tried to access the portal login controller without username
provided");
- resp.sendError(HttpServletResponse.SC_BAD_REQUEST, "No username
provided");
- return;
+
+ if (username != null && password != null)
+ {
+ log.debug("Found username and password and set credentials in http
session");
+ Credentials credentials = new Credentials(username, password);
+ req.getSession().setAttribute(Credentials.CREDENTIALS, credentials);
}
- if (password == null)
- {
- log.error("Tried to access the portal login controller without password
provided");
- resp.sendError(HttpServletResponse.SC_BAD_REQUEST, "No password
provided");
- return;
- }
-
- //
- log.debug("Found username and password and set credentials in http
session");
- credentials = new Credentials(username, password);
- req.getSession().setAttribute(Credentials.CREDENTIALS, credentials);
}
protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws
ServletException, IOException
Show replies by date