Fixed a bug where the AA was issuing assertions with a very short default lifetime.
authorwassa <wassa@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Thu, 8 Apr 2004 20:30:43 +0000 (20:30 +0000)
committerwassa <wassa@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Thu, 8 Apr 2004 20:30:43 +0000 (20:30 +0000)
git-svn-id: https://subversion.switch.ch/svn/shibboleth/java-idp/trunk@961 ab3bd59b-922f-494d-bb5f-6f0a3c29deca

src/edu/internet2/middleware/shibboleth/aa/AAAttribute.java
src/edu/internet2/middleware/shibboleth/aa/AAServlet.java

index b0c2c87..3f6b06e 100644 (file)
@@ -83,7 +83,7 @@ public class AAAttribute extends SAMLAttribute implements ResolverAttribute, Arp
        public final static String SHIB_ATTRIBUTE_NAMESPACE_URI = "urn:mace:shibboleth:1.0:attributeNamespace:uri";
        
        /** Default lifetime, in seconds **/
-       private static long defaultLifetime = 300;
+       private static long defaultLifetime = 1800; // 30 minutes
        private ValueHandler valueHandler = new StringValueHandler();
 
        public AAAttribute(String name) throws SAMLException {
index c5f0383..0305fcc 100755 (executable)
@@ -445,7 +445,7 @@ public class AAServlet extends TargetFederationComponent {
                                        }
                                }
                                Date now = new Date();
-                               Date then = new Date(now.getTime() + max);
+                               Date then = new Date(now.getTime() + (max * 1000)); //max is in seconds
 
                                SAMLAssertion sAssertion = new SAMLAssertion(relyingParty.getIdentityProvider().getProviderId(), now,
                                                then, Collections.singleton(condition), null, Collections.singleton(statement));