[java-opensaml COMMIT] /trunk/opensaml-saml-impl/src/main/java/org/opensaml/saml/common/profile/impl/AddNotOnOrAfterC...

noreply at shibboleth.net noreply at shibboleth.net
Sun Mar 9 17:44:09 EDT 2014


Author: scantor
Date: Sun Mar  9 17:44:08 2014
New Revision: 3684

URL: http://svn.shibboleth.net/view/java-opensaml?rev=3684&view=rev
Log:
Base condition off assertion issue instant.

Modified:
    trunk/opensaml-saml-impl/src/main/java/org/opensaml/saml/common/profile/impl/AddNotOnOrAfterConditionToAssertions.java

Modified: trunk/opensaml-saml-impl/src/main/java/org/opensaml/saml/common/profile/impl/AddNotOnOrAfterConditionToAssertions.java
URL: http://svn.shibboleth.net/view/java-opensaml/trunk/opensaml-saml-impl/src/main/java/org/opensaml/saml/common/profile/impl/AddNotOnOrAfterConditionToAssertions.java?rev=3684&r1=3683&r2=3684&view=diff
==============================================================================
--- trunk/opensaml-saml-impl/src/main/java/org/opensaml/saml/common/profile/impl/AddNotOnOrAfterConditionToAssertions.java (original)
+++ trunk/opensaml-saml-impl/src/main/java/org/opensaml/saml/common/profile/impl/AddNotOnOrAfterConditionToAssertions.java Sun Mar  9 17:44:08 2014
@@ -157,9 +157,8 @@
             for (final org.opensaml.saml.saml1.core.Assertion assertion :
                     ((org.opensaml.saml.saml1.core.Response) response).getAssertions()) {
 
-                final DateTime expiration =
-                        new DateTime(((org.opensaml.saml.saml1.core.Response) response).getIssueInstant()).plus(
-                                lifetime != null ? lifetime : defaultAssertionLifetime);
+                final DateTime expiration = new DateTime(assertion.getIssueInstant()).plus(
+                        lifetime != null ? lifetime : defaultAssertionLifetime);
                 log.debug("{} Added NotOnOrAfter condition, indicating an expiration of {}, to Assertion {}",
                         new Object[] {getLogPrefix(), expiration, assertion.getID()});
                 SAML1ActionSupport.addConditionsToAssertion(this, assertion).setNotOnOrAfter(expiration);
@@ -168,9 +167,8 @@
             for (final org.opensaml.saml.saml2.core.Assertion assertion :
                     ((org.opensaml.saml.saml2.core.Response) response).getAssertions()) {
 
-                final DateTime expiration =
-                        new DateTime(((org.opensaml.saml.saml2.core.Response) response).getIssueInstant()).plus(
-                                lifetime != null ? lifetime : defaultAssertionLifetime);
+                final DateTime expiration = new DateTime(assertion.getIssueInstant()).plus(
+                        lifetime != null ? lifetime : defaultAssertionLifetime);
                 log.debug("{} Added NotOnOrAfter condition, indicating an expiration of {}, to Assertion {}",
                         new Object[] {getLogPrefix(), expiration, assertion.getID()});
                 SAML2ActionSupport.addConditionsToAssertion(this, assertion).setNotOnOrAfter(expiration);



More information about the commits mailing list