When binding a login context to a cookie also bind it to a request attribute
authorlajoie <lajoie@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Wed, 8 Jul 2009 08:22:12 +0000 (08:22 +0000)
committerlajoie <lajoie@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Wed, 8 Jul 2009 08:22:12 +0000 (08:22 +0000)
git-svn-id: https://subversion.switch.ch/svn/shibboleth/java-idp/branches/REL_2@2866 ab3bd59b-922f-494d-bb5f-6f0a3c29deca

src/main/java/edu/internet2/middleware/shibboleth/idp/util/HttpServletHelper.java

index 6e881be..a61ab57 100644 (file)
@@ -120,11 +120,11 @@ public class HttpServletHelper {
      * @param loginContext login context to be bound
      * @param request current HTTP request
      */
-    public static void bindLoginContext(LoginContext loginContext, HttpServletRequest request) {
-        if (request == null) {
+    public static void bindLoginContext(LoginContext loginContext, HttpServletRequest httpRequest) {
+        if (httpRequest == null) {
             throw new IllegalArgumentException("HTTP request may not be null");
         }
-        request.setAttribute(LOGIN_CTX_KEY_NAME, loginContext);
+        httpRequest.setAttribute(LOGIN_CTX_KEY_NAME, loginContext);
     }
 
     /**
@@ -148,6 +148,8 @@ public class HttpServletHelper {
         if (loginContext == null) {
             return;
         }
+        
+        bindLoginContext(loginContext, httpRequest);
 
         String parition = getContextParam(context, LOGIN_CTX_PARTITION_CTX_PARAM, DEFAULT_LOGIN_CTX_PARITION);
         log.debug("LoginContext parition: {}", parition);