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

noreply at shibboleth.net noreply at shibboleth.net
Fri Mar 1 19:17:58 EST 2013


Author: putmanb
Date: Fri Mar  1 19:17:58 2013
New Revision: 3244

URL: http://svn.shibboleth.net/view/java-opensaml?rev=3244&view=rev
Log:
Refactor ArtifactBuilders so that they no longer require dependency on the (self) issuer's metadata.
Instead just pull the required bits from the SamlArtifactContext.
How that context gets populated is a task for another component. 

Modified:
    trunk/opensaml-saml-api/src/main/java/org/opensaml/saml/common/messaging/context/SamlArtifactContext.java
    trunk/opensaml-saml-api/src/main/java/org/opensaml/saml/saml1/binding/artifact/SAML1ArtifactType0001Builder.java
    trunk/opensaml-saml-api/src/main/java/org/opensaml/saml/saml1/binding/artifact/SAML1ArtifactType0002Builder.java
    trunk/opensaml-saml-api/src/main/java/org/opensaml/saml/saml2/binding/artifact/SAML2ArtifactType0004Builder.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=3244&r1=3243&r2=3244&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 Fri Mar  1 19:17:58 2013
@@ -26,8 +26,17 @@
  */
 public class SamlArtifactContext extends BaseContext {
 
-    /** The entityId of the SAML entity. */
+    /** The artifact type. */
     private byte[] artifactType;
+    
+    /** The artifact source entityID. */
+    private String sourceEntityId;
+    
+    /** The artifact source attribute resolutions server endpoint URL. */
+    private String sourceAttributeResolutionServiceEndpointUrl;
+    
+    /** The artifact source attribute resolutions server endpoint index. */
+    private Integer sourceAttributeResolutionServiceEndpointIndex;
 
     /**
      * Gets the artifact type.
@@ -47,4 +56,58 @@
         artifactType = type;
     }
 
+    /**
+     * Get the artifact source entityID.
+     * 
+     * @return the source entityID, may be null
+     */
+    @Nullable public String getSourceEntityId() {
+        return sourceEntityId;
+    }
+
+    /**
+     * Set the artifact source entityID.
+     * 
+     * @param entityId the new source entityID
+     */
+    public void setSourceEntityId(@Nullable final String entityId) {
+        sourceEntityId = entityId;
+    }
+
+    /**
+     * Get the source attribute resolution service endpoint URL.
+     * 
+     * @return the URL
+     */
+    @Nullable public String getSourceAttributeResolutionServiceEndpointUrl() {
+        return sourceAttributeResolutionServiceEndpointUrl;
+    }
+
+    /**
+     * Set the source attribute resolution service endpoint URL.
+     * 
+     * @param sourceAttributeResolutionServiceEndpointUrl the new URL
+     */
+    public void setSourceAttributeResolutionServiceEndpointUrl(@Nullable final String url) {
+        sourceAttributeResolutionServiceEndpointUrl = url;
+    }
+
+    /**
+     * Get the source attribute resolution service endpoint index.
+     * 
+     * @return the index
+     */
+    @Nullable public Integer getSourceAttributeResolutionServiceEndpointIndex() {
+        return sourceAttributeResolutionServiceEndpointIndex;
+    }
+
+    /**
+     * Set the source attribute resolution service endpoint index.
+     * 
+     * @param index the new index
+     */
+    public void setSourceAttributeResolutionServiceEndpointIndex(@Nullable final Integer index) {
+        sourceAttributeResolutionServiceEndpointIndex = index;
+    }
+
 }

Modified: trunk/opensaml-saml-api/src/main/java/org/opensaml/saml/saml1/binding/artifact/SAML1ArtifactType0001Builder.java
URL: http://svn.shibboleth.net/view/java-opensaml/trunk/opensaml-saml-api/src/main/java/org/opensaml/saml/saml1/binding/artifact/SAML1ArtifactType0001Builder.java?rev=3244&r1=3243&r2=3244&view=diff
==============================================================================
--- trunk/opensaml-saml-api/src/main/java/org/opensaml/saml/saml1/binding/artifact/SAML1ArtifactType0001Builder.java (original)
+++ trunk/opensaml-saml-api/src/main/java/org/opensaml/saml/saml1/binding/artifact/SAML1ArtifactType0001Builder.java Fri Mar  1 19:17:58 2013
@@ -25,7 +25,7 @@
 
 import org.opensaml.messaging.context.MessageContext;
 import org.opensaml.saml.common.SAMLObject;
-import org.opensaml.saml.common.messaging.context.SamlSelfEntityContext;
+import org.opensaml.saml.common.messaging.context.SamlArtifactContext;
 import org.opensaml.saml.saml1.core.Assertion;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -47,7 +47,7 @@
     public SAML1ArtifactType0001 buildArtifact(MessageContext<SAMLObject> requestContext, Assertion assertion) {
         try {
             MessageDigest sha1Digester = MessageDigest.getInstance("SHA-1");

[... 340 lines stripped ...]


More information about the commits mailing list