First cut at a protocol handler for federal e-auth.
authorwassa <wassa@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Tue, 5 Apr 2005 21:16:46 +0000 (21:16 +0000)
committerwassa <wassa@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Tue, 5 Apr 2005 21:16:46 +0000 (21:16 +0000)
git-svn-id: https://subversion.switch.ch/svn/shibboleth/java-idp/trunk@1378 ab3bd59b-922f-494d-bb5f-6f0a3c29deca

src/edu/internet2/middleware/shibboleth/common/RelyingParty.java
src/edu/internet2/middleware/shibboleth/common/ServiceProviderMapper.java
src/schemas/shibboleth-idpconfig-1.0.xsd

index 59b51e6..6722399 100644 (file)
@@ -114,4 +114,9 @@ public interface RelyingParty extends ServiceProvider {
         * Returns the type of SAML Artifact that this appropriate for use with this Relying Party.
         */
        public int getPreferredArtifactType();
+
+       /**
+        * Returns thhe default "TARGET" attribute to be used with the artifact profile or null if none is specified.
+        */
+       public String getDefaultTarget();
 }
index 7a83c21..0efec29 100644 (file)
@@ -228,6 +228,7 @@ public class ServiceProviderMapper {
                private boolean defaultToPOST = true;
                private boolean wantsAssertionsSigned = false;
                private int preferredArtifactType = 1;
+               private String defaultTarget;
 
                public RelyingPartyImpl(Element partyConfig, IdPConfig globalConfig, Credentials credentials,
                                NameMapper nameMapper) throws ServiceProviderMapperException {
@@ -300,6 +301,9 @@ public class ServiceProviderMapper {
                                log.debug("Relying party does not want SAML Assertions to be signed.");
                        }
 
+                       // Set a default target for use in artifact redirects
+                       defaultTarget = ((Element) partyConfig).getAttribute("defaultTarget");
+
                        // Determine whether or not we are forcing attribute push on or off
                        String forcePush = ((Element) partyConfig).getAttribute("forceAttributePush");
                        String forceNoPush = ((Element) partyConfig).getAttribute("forceAttributeNoPush");
@@ -458,6 +462,11 @@ public class ServiceProviderMapper {
                        return preferredArtifactType;
                }
 
+               public String getDefaultTarget() {
+
+                       return defaultTarget;
+               }
+
                /**
                 * Default identity provider implementation.
                 * 
@@ -573,6 +582,11 @@ public class ServiceProviderMapper {
 
                        return wrapped.getPreferredArtifactType();
                }
+
+               public String getDefaultTarget() {
+
+                       return wrapped.getDefaultTarget();
+               }
        }
 
        /**
@@ -655,6 +669,11 @@ public class ServiceProviderMapper {
 
                        return wrapped.getPreferredArtifactType();
                }
+
+               public String getDefaultTarget() {
+
+                       return wrapped.getDefaultTarget();
+               }
        }
 
        /**
index 28895a0..9e830c8 100644 (file)
@@ -64,6 +64,7 @@
                                                        <xs:attribute name="defaultToPOSTProfile" type="xs:boolean" use="optional"/>
                                                        <xs:attribute name="defaultAuthMethod" type="xs:string" use="optional"/>
                                                        <xs:attribute name="preferredArtifactType" type="xs:integer" use="optional"/>
+                                                       <xs:attribute name="defaultTarget" type="xs:string" use="optional"/>
                                                </xs:complexType>
                                        </xs:element>
                                </xs:sequence>