Moved the HS configuration to a seperate xml file. Created a schema for this file...
authorwassa <wassa@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Wed, 5 Jun 2002 05:09:17 +0000 (05:09 +0000)
committerwassa <wassa@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Wed, 5 Jun 2002 05:09:17 +0000 (05:09 +0000)
git-svn-id: https://subversion.switch.ch/svn/shibboleth/java-idp/trunk@30 ab3bd59b-922f-494d-bb5f-6f0a3c29deca

src/edu/internet2/middleware/shibboleth/hs/HandleService.java
src/edu/internet2/middleware/shibboleth/hs/HsConfigDigester.java
webApplication/WEB-INF/conf/hsconfig.xml [new file with mode: 0755]
webApplication/WEB-INF/conf/hsconfig.xsd [new file with mode: 0755]
webApplication/WEB-INF/conf/shibboleth.xml

index a12e5aa..3ad7c01 100755 (executable)
@@ -94,7 +94,7 @@ public class HandleService extends HttpServlet {
                hsConfigFileLocation =
                        getServletConfig().getInitParameter("HSConfigFileLocation");
                if (hsConfigFileLocation == null) {
-                       hsConfigFileLocation = "/WEB-INF/conf/shibboleth.xml";
+                       hsConfigFileLocation = "/WEB-INF/conf/hsconfig.xml";
                }
                log4jConfigFileLocation =
                        getServletConfig().getInitParameter("log4jConfigFileLocation");
index 8f73b74..eae3f59 100755 (executable)
@@ -49,10 +49,10 @@ public class HsConfigDigester extends Digester {
                if (configured == true) {
                        return;
                }
-               addObjectCreate("ShibbolethConfig", hsConfigClass);
-               addSetProperties("ShibbolethConfig/HsConfig");
-               addCallMethod("ShibbolethConfig/HsConfig/HelpText", "setHelpText", 0);
-               addCallMethod("ShibbolethConfig/HsConfig/SecretKey", "setSecretKey", 0);
+               addObjectCreate("HandleServiceConfig", hsConfigClass);
+               addSetProperties("HandleServiceConfig");
+               addCallMethod("HandleServiceConfig/HelpText", "setHelpText", 0);
+               addCallMethod("HandleServiceConfig/SecretKey", "setSecretKey", 0);
 
                configured = true;
 
diff --git a/webApplication/WEB-INF/conf/hsconfig.xml b/webApplication/WEB-INF/conf/hsconfig.xml
new file mode 100755 (executable)
index 0000000..e81eb50
--- /dev/null
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Example configuration file for the Shibboleth Handle Service - Walter Hoehn - 06/05/2002 -->
+<HandleServiceConfig xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="hsconfig.xsd">
+                                               supportContact="mailto:shib-test@internet2.org" 
+                                               logoLocation="images/internet2.gif" 
+                                               validityPeriod="1400000" 
+                                               domain="internet2.edu" 
+                                               issuer="shib2.internet2.edu" 
+                                               aaURL="https://shib2.internet2.edu/shibb/servlet/AAServlet" 
+                                               detailedHelpURL="http://foo.bar" 
+                                               
+       <HelpText>In order to fulfill the request for the web resource you have just chosen, information must be sent from your home institution to the provider of the resource.  The web resource should load automatically.  If it does not load within five seconds, click on the Transmit button.</HelpText>
+       <SecretKey>npsHVB/3OALcE+ydFtxAKp6bB1Qf9zgC</SecretKey>
+</HandleServiceConfig>
diff --git a/webApplication/WEB-INF/conf/hsconfig.xsd b/webApplication/WEB-INF/conf/hsconfig.xsd
new file mode 100755 (executable)
index 0000000..007b3d9
--- /dev/null
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Schema for the Shibboleth Handle Service configuration file - Walter Hoehn - 06/05/2002 -->
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+       <xs:element name="HandleServiceConfig">
+               <xs:complexType>
+                       <xs:sequence>
+                               <xs:element name="HelpText" type="xs:string" minOccurs="0" maxOccurs="1"/>
+                               <xs:element name="SecretKey" type="xs:string" minOccurs="1" maxOccurs="1"/>
+                       </xs:sequence>
+                       <xs:attribute name="supportContact" type="xs:string" use="optional"/>
+                       <xs:attribute name="logoLocation" type="xs:string" use="optional"/>
+                       <xs:attribute name="validityPeriod" type="xs:int" use="optional"/>
+                       <xs:attribute name="domain" type="xs:string" use="required"/>
+                       <xs:attribute name="issuer" type="xs:string" use="required"/>
+                       <xs:attribute name="aaURL" type="xs:anyURI" use="required"/>
+                       <xs:attribute name="detailedHelpURL" type="xs:anyURI" use="optional"/>
+               </xs:complexType>
+       </xs:element>
+</xs:schema>
index 6071768..5a66dcb 100755 (executable)
                        <String>School</String>
                </SearchIgnore>
        </WayfConfig>
-       
-       <HsConfig 
-               supportContact="mailto:shib-test@internet2.org"
-               logoLocation="images/internet2.gif"
-               validityPeriod = "1400000"
-               domain = "internet2.edu"
-               issuer = "shib2.internet2.edu"
-               aaURL = "https://shib2.internet2.edu/shibb/servlet/AAServlet"
-               detailedHelpURL = "http://foo.bar"
-               handleRepositoryImplementation = "edu.internet2.middleware.shibboleth.common.provider.MemoryHandleRepository">
-                       <HelpText>In order to fulfill the request for the web resource you have just chosen, information must be sent from your home institution to the provider of the resource.  The web resource should load automatically.  If it does not load within five seconds, click on the Transmit button.</HelpText>
-                       <SecretKey>npsHVB/3OALcE+ydFtxAKp6bB1Qf9zgC</SecretKey>
-       </HsConfig>
 
 </ShibbolethConfig>