[java-identity-provider COMMIT] in /trunk: idp-profile-api/src/test/resources/logback-test.xml idp-profile-impl/pom.x...

noreply at shibboleth.net noreply at shibboleth.net
Wed Dec 7 20:52:08 GMT 2011


Author: lajoie
Date: Wed Dec  7 20:52:08 2011
New Revision: 4085

URL: http://svn.shibboleth.net/view/java-identity-provider?rev=4085&view=rev
Log:
More unit testing and bug fixes

Added:
    trunk/idp-profile-impl/src/test/java/net/shibboleth/idp/profile/impl/CheckSpringRequestContextTest.java   (with props)
Modified:
    trunk/idp-profile-api/src/test/resources/logback-test.xml
    trunk/idp-profile-impl/pom.xml
    trunk/idp-profile-impl/src/main/java/net/shibboleth/idp/profile/impl/CheckMessageLifetime.java
    trunk/idp-profile-impl/src/test/java/net/shibboleth/idp/profile/impl/CheckMandatoryIssuerTest.java
    trunk/idp-profile-impl/src/test/java/net/shibboleth/idp/profile/impl/CheckMandatoryLifetimeTest.java
    trunk/idp-profile-impl/src/test/java/net/shibboleth/idp/profile/impl/CheckMessageReplayTest.java
    trunk/idp-profile-impl/src/test/resources/logback-test.xml

Modified: trunk/idp-profile-api/src/test/resources/logback-test.xml
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-profile-api/src/test/resources/logback-test.xml?rev=4085&r1=4084&r2=4085&view=diff
==============================================================================
--- trunk/idp-profile-api/src/test/resources/logback-test.xml (original)
+++ trunk/idp-profile-api/src/test/resources/logback-test.xml Wed Dec  7 20:52:08 2011
@@ -1,7 +1,8 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <configuration>
 
-    <logger name="net.shibboleth.attribute" level="DEBUG"/>
+    <logger name="net.shibboleth.idp.profile" level="DEBUG"/>
+    <logger name="net.shibboleth.idp.relyingparty" level="DEBUG"/>
 
     <appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
         <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
@@ -14,4 +15,4 @@
         <appender-ref ref="CONSOLE"/>
     </root>
 
-</configuration>
+</configuration>

Modified: trunk/idp-profile-impl/pom.xml
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-profile-impl/pom.xml?rev=4085&r1=4084&r2=4085&view=diff
==============================================================================
--- trunk/idp-profile-impl/pom.xml (original)
+++ trunk/idp-profile-impl/pom.xml Wed Dec  7 20:52:08 2011
@@ -28,7 +28,18 @@
         <!-- Runtime Dependencies -->
 
         <!-- Test Dependencies -->
-
+        <dependency>
+            <groupId>org.mockito</groupId>
+            <artifactId>mockito-all</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>idp-profile-api</artifactId>
+            <version>${project.version}</version>
+            <type>test-jar</type>
+            <scope>test</scope>
+        </dependency>
+        
     </dependencies>
 
 </project>

Modified: trunk/idp-profile-impl/src/main/java/net/shibboleth/idp/profile/impl/CheckMessageLifetime.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-profile-impl/src/main/java/net/shibboleth/idp/profile/impl/CheckMessageLifetime.java?rev=4085&r1=4084&r2=4085&view=diff
==============================================================================
--- trunk/idp-profile-impl/src/main/java/net/shibboleth/idp/profile/impl/CheckMessageLifetime.java (original)
+++ trunk/idp-profile-impl/src/main/java/net/shibboleth/idp/profile/impl/CheckMessageLifetime.java Wed Dec  7 20:52:08 2011
@@ -17,6 +17,8 @@
 
 package net.shibboleth.idp.profile.impl;
 
+import java.util.concurrent.TimeUnit;
+
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
@@ -25,26 +27,23 @@
 import net.shibboleth.idp.profile.InvalidProfileRequestContextStateException;
 import net.shibboleth.idp.profile.ProfileException;
 import net.shibboleth.idp.profile.ProfileRequestContext;
+import net.shibboleth.idp.relyingparty.RelyingPartySubcontext;
 
 import org.joda.time.DateTime;
 import org.opensaml.messaging.context.BasicMessageMetadataSubcontext;
+import org.opensaml.util.component.UnmodifiableComponentException;
 import org.springframework.webflow.execution.Event;
 import org.springframework.webflow.execution.RequestContext;
-
-//TODO get clock skew from profile configuration's security config
 
 /** An action that checks that the inbound message should be considered valid based upon when it was issued. */
 public final class CheckMessageLifetime extends AbstractIdentityProviderAction {
 
-    /** Allowed clock skew, in milliseconds. */
-    private long clockskew;
-
-    /** Amount of time, in milliseconds, for which a message is valid. */
+    /** Amount of time, in milliseconds, for which a message is valid. Default value: 5 minutes */
     private long messageLifetime;
 
-    /** Constructor. The ID of this component is set to the name of this class. */
+    /** Constructor. */
     public CheckMessageLifetime() {
-        setId(CheckMessageLifetime.class.getName());
+        messageLifetime = TimeUnit.MILLISECONDS.convert(5, TimeUnit.MINUTES);
     }
 
     /** {@inheritDoc} */
@@ -52,9 +51,35 @@
         return BasicMessageMetadataSubcontext.class;
     }
 

[... 301 lines stripped ...]


More information about the commits mailing list