[java-opensaml COMMIT] /trunk/opensaml-saml-api/src/main/java/org/opensaml/saml/common/messaging/context/SAMLArtifact...

noreply at shibboleth.net noreply at shibboleth.net
Tue Apr 29 11:21:07 EDT 2014


Author: scantor
Date: Tue Apr 29 11:21:07 2014
New Revision: 3824

URL: http://svn.shibboleth.net/view/java-opensaml?rev=3824&view=rev
Log:
Add intelligent lookup of source entity.

Modified:
    trunk/opensaml-saml-api/src/main/java/org/opensaml/saml/common/messaging/context/SAMLArtifactContext.java

Modified: trunk/opensaml-saml-api/src/main/java/org/opensaml/saml/common/messaging/context/SAMLArtifactContext.java
URL: http://svn.shibboleth.net/view/java-opensaml/trunk/opensaml-saml-api/src/main/java/org/opensaml/saml/common/messaging/context/SAMLArtifactContext.java?rev=3824&r1=3823&r2=3824&view=diff
==============================================================================
--- trunk/opensaml-saml-api/src/main/java/org/opensaml/saml/common/messaging/context/SAMLArtifactContext.java (original)
+++ trunk/opensaml-saml-api/src/main/java/org/opensaml/saml/common/messaging/context/SAMLArtifactContext.java Tue Apr 29 11:21:07 2014
@@ -65,6 +65,14 @@
      * @return the source entityID, may be null
      */
     @Nullable @NotEmpty public String getSourceEntityId() {
+        if (sourceEntityId == null) {
+            if (getParent() != null) {
+                final SAMLSelfEntityContext self = getParent().getSubcontext(SAMLSelfEntityContext.class);
+                if (self != null) {
+                    sourceEntityId = self.getEntityId();
+                }
+            }
+        }
         return sourceEntityId;
     }
 



More information about the commits mailing list