cleanup, add checks to arguments and responses, add log statements
[java-idp.git] / src / edu / internet2 / middleware / shibboleth / serviceprovider / FilterSupportImpl.java
index 9e52c45..7b9e8af 100644 (file)
@@ -104,10 +104,8 @@ public class FilterSupportImpl implements FilterSupport {
         * @return     true if Shibboleth is required
         */
        public boolean isProtected(String url) {
-           // TODO Add some real logic. This is just a placeholder
-           if (url.endsWith("test.txt"))
-               return true;
-           return false;
+               //TODO: get info from requestmap
+           return true;
        }
 
        /**
@@ -168,8 +166,10 @@ public class FilterSupportImpl implements FilterSupport {
             sessionid = AssertionConsumerServlet.createSessionFromPost(
                     ipaddr, request, applicationId, shireURL, providerId,emptySessionId);
         } catch (SAMLException e) {
+               log.error("Invalid POST data submitted by RM "+e);
             return null;
         }
+        log.info("Session created from POST submitted by RM: "+sessionid);
         return sessionid;
     }
 
@@ -189,7 +189,7 @@ public class FilterSupportImpl implements FilterSupport {
      * @return SessionId of empty session
      */
     public String createSession(String applicationId) {
-        return context.getSessionManager().newSession(
-                applicationId, null, null, null, null, null);
+        String id = context.getSessionManager().reserveSession(applicationId);
+        return id;
     }
 }