portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tay...@apache.org
Subject svn commit: r380774 - /portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/login/filter/PortalFilter.java
Date Fri, 24 Feb 2006 18:41:03 GMT
Author: taylor
Date: Fri Feb 24 10:41:01 2006
New Revision: 380774

URL: http://svn.apache.org/viewcvs?rev=380774&view=rev
Log:
optimizations to non-CMA login

Modified:
    portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/login/filter/PortalFilter.java

Modified: portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/login/filter/PortalFilter.java
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/login/filter/PortalFilter.java?rev=380774&r1=380773&r2=380774&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/login/filter/PortalFilter.java
(original)
+++ portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/login/filter/PortalFilter.java
Fri Feb 24 10:41:01 2006
@@ -28,6 +28,7 @@
 import javax.servlet.ServletRequest;
 import javax.servlet.ServletResponse;
 import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpSession;
 
 import org.apache.jetspeed.Jetspeed;
 import org.apache.jetspeed.PortalReservedParameters;
@@ -51,7 +52,6 @@
         if (sRequest instanceof HttpServletRequest)
         {
             HttpServletRequest request = (HttpServletRequest)sRequest;
-            System.out.println("...path..." + request.getPathInfo());
             String username = request.getParameter(LoginConstants.USERNAME);
             String password = request.getParameter(LoginConstants.PASSWORD);            
             if (username != null)
@@ -66,6 +66,9 @@
                     principals.add(userPrincipal);
                     sRequest = wrapperRequest((HttpServletRequest)request, userPrincipal);
                     request.getSession().removeAttribute(LoginConstants.ERRORCODE);
+                    HttpSession session = request.getSession(true);
+                    session.setAttribute(PortalReservedParameters.SESSION_KEY_SUBJECT, subject);
+                    //System.out.println("*** login session = " + session);
                 }
                 else
                 {
@@ -74,11 +77,19 @@
             }
             else
             {
+                HttpSession session = request.getSession();
+                //System.out.println("*** session = " + session);
                 Subject subject = (Subject)request.getSession().getAttribute(PortalReservedParameters.SESSION_KEY_SUBJECT);
                 if (subject != null)
                 {
                     Principal principal = SecurityHelper.getPrincipal(subject, UserPrincipal.class);
-                    sRequest = wrapperRequest((HttpServletRequest)request, principal);
+                    if (principal != null && principal.getName().equals("guest"))
+                    {                        
+                    }
+                    else
+                    {
+                        sRequest = wrapperRequest((HttpServletRequest)request, principal);
+                    }
                 }                
             }              
         }



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


Mime
View raw message