Removed some old "origin" naming.
authorwassa <wassa@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Fri, 6 May 2005 19:46:34 +0000 (19:46 +0000)
committerwassa <wassa@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Fri, 6 May 2005 19:46:34 +0000 (19:46 +0000)
git-svn-id: https://subversion.switch.ch/svn/shibboleth/java-idp/trunk@1449 ab3bd59b-922f-494d-bb5f-6f0a3c29deca

src/edu/internet2/middleware/shibboleth/aa/attrresolv/provider/PersistentIDAttributeDefinition.java
src/edu/internet2/middleware/shibboleth/common/IdPConfigLoader.java [moved from src/edu/internet2/middleware/shibboleth/common/OriginConfig.java with 76% similarity]
src/edu/internet2/middleware/shibboleth/idp/IdPConfig.java
src/edu/internet2/middleware/shibboleth/idp/IdPResponder.java
src/edu/internet2/middleware/shibboleth/log/LoggingContextListener.java
src/edu/internet2/middleware/shibboleth/utils/ResolverTest.java
webApplication/sample.jsp

index 36ec9b9..a4c2e3d 100644 (file)
@@ -130,7 +130,7 @@ public class PersistentIDAttributeDefinition extends BaseAttributeDefinition imp
                                if (usingDefaultSecret()) {
                                        log
                                                        .warn("You are running the PersistentIDAttributeDefinition PlugIn with the default secret key as a salt.  This is UNSAFE!  Please change "
-                                                                       + "this configuration and restart the origin.");
+                                                                       + "this configuration and restart the IdP.");
                                }
                                this.salt = secret.getEncoded();
 
@@ -39,23 +39,23 @@ import edu.internet2.middleware.shibboleth.xml.Parser;
  * @author Walter Hoehn
  * @author Noah Levitt
  */
-public class OriginConfig {
+public class IdPConfigLoader {
 
-       private static Logger   log                                     = Logger.getLogger(OriginConfig.class);
-       private static Document originConfig            = null;
-       private static String   originConfigFile        = null;
+       private static Logger   log                                     = Logger.getLogger(IdPConfigLoader.class);
+       private static Document idpConfig               = null;
+       private static String   idpConfigFile   = null;
 
        // never returns null
-       private static String getOriginConfigFile(ServletContext context) {
-               if (context.getInitParameter("OriginConfigFile") != null) {
-                       return context.getInitParameter("OriginConfigFile");
+       private static String getIdPConfigFile(ServletContext context) {
+               if (context.getInitParameter("IdpConfigFile") != null) {
+                       return context.getInitParameter("IdPConfigFile");
                } else {
-                       return "/conf/origin.xml";
+                       return "/conf/idp.xml";
                }
        }
 
        /**
-        * Loads the Origin Configuration file into a DOM tree.
+        * Loads the IdP Configuration file into a DOM tree.
         * 
         * @param configFileLocation
         *            URL of the configuration file
@@ -63,41 +63,41 @@ public class OriginConfig {
         * @throws ShibbolethConfigurationException
         *             if there was an error loading the file
         */
-       public static synchronized Document getOriginConfig(String configFileLocation)
+       public static synchronized Document getIdPConfig(String configFileLocation)
                        throws ShibbolethConfigurationException {
 
-               if (configFileLocation.equals(originConfigFile)) {
-                       return originConfig;
+               if (configFileLocation.equals(idpConfigFile)) {
+                       return idpConfig;
                        
-               } else if (originConfigFile == null) {
-                       originConfigFile = configFileLocation;
+               } else if (idpConfigFile == null) {
+                       idpConfigFile = configFileLocation;
                        
                } else {
-                       log.error("Previously read origin configuration from (" + originConfigFile + "), re-reading from ("
+                       log.error("Previously read IdP configuration from (" + idpConfigFile + "), re-reading from ("
                                        + configFileLocation + "). This probably indicates a bug in shibboleth.");
-                       originConfigFile = configFileLocation;
+                       idpConfigFile = configFileLocation;
                }
 
                try {
-                       originConfig = Parser.loadDom(configFileLocation, true);
+                       idpConfig = Parser.loadDom(configFileLocation, true);
                } catch (Exception e) {
                        log.error("Encountered an error while parsing Shibboleth Identity Provider configuration file: " + e);
                        throw new ShibbolethConfigurationException("Unable to parse IdP configuration file.");
                }
-               return originConfig;
+               return idpConfig;
        }
 
        /**
-        * Loads the Origin Configuration file into a DOM tree.
+        * Loads the IdP Configuration file into a DOM tree.
         * 
         * @param context
-        *            {@link ServletContext}from which to figure out the location of origin.xml
+        *            {@link ServletContext}from which to figure out the location of IdP
         * @return the DOM Document
         * @throws ShibbolethConfigurationException
         *             if there was an error loading the file
         */
-       public static Document getOriginConfig(ServletContext context) throws ShibbolethConfigurationException {
-               return getOriginConfig(getOriginConfigFile(context));
+       public static Document getIdPConfig(ServletContext context) throws ShibbolethConfigurationException {
+               return getIdPConfig(getIdPConfigFile(context));
 
        }
 }
index c078abf..673d09f 100644 (file)
@@ -54,7 +54,7 @@ public class IdPConfig {
 
        public IdPConfig(Element config) throws ShibbolethConfigurationException {
 
-               if (!config.getTagName().equals("IdPConfig") && !config.getTagName().equals("ShibbolethOriginConfig")) { throw new ShibbolethConfigurationException(
+               if (!config.getTagName().equals("IdPConfig")) { throw new ShibbolethConfigurationException(
                                "Unexpected configuration data.  <IdPConfig/> is needed."); }
 
                log.debug("Loading global configuration properties.");
@@ -178,4 +178,4 @@ public class IdPConfig {
 
                return AAUrl;
        }
-}
+}
\ No newline at end of file
index b34edbe..49df477 100644 (file)
@@ -61,7 +61,7 @@ import edu.internet2.middleware.shibboleth.common.Credentials;
 import edu.internet2.middleware.shibboleth.common.NameIdentifierMapping;
 import edu.internet2.middleware.shibboleth.common.NameIdentifierMappingException;
 import edu.internet2.middleware.shibboleth.common.NameMapper;
-import edu.internet2.middleware.shibboleth.common.OriginConfig;
+import edu.internet2.middleware.shibboleth.common.IdPConfigLoader;
 import edu.internet2.middleware.shibboleth.common.ServiceProviderMapper;
 import edu.internet2.middleware.shibboleth.common.ServiceProviderMapperException;
 import edu.internet2.middleware.shibboleth.common.ShibbolethConfigurationException;
@@ -98,7 +98,7 @@ public class IdPResponder extends HttpServlet {
                try {
                        binding = SAMLBindingFactory.getInstance(SAMLBinding.SOAP);
 
-                       Document originConfig = OriginConfig.getOriginConfig(this.getServletContext());
+                       Document originConfig = IdPConfigLoader.getIdPConfig(this.getServletContext());
 
                        // Load global configuration properties
                        configuration = new IdPConfig(originConfig.getDocumentElement());
index 9a5b051..15d7070 100644 (file)
@@ -47,7 +47,7 @@ import org.w3c.dom.NamedNodeMap;
 import org.w3c.dom.Node;
 import org.w3c.dom.NodeList;
 
-import edu.internet2.middleware.shibboleth.common.OriginConfig;
+import edu.internet2.middleware.shibboleth.common.IdPConfigLoader;
 import edu.internet2.middleware.shibboleth.common.ShibResource;
 import edu.internet2.middleware.shibboleth.common.ShibbolethConfigurationException;
 import edu.internet2.middleware.shibboleth.idp.IdPConfig;
@@ -78,7 +78,7 @@ public class LoggingContextListener implements ServletContextListener {
                rootAppender.setLayout(new PatternLayout("%d{ISO8601} %-5p %-41X{serviceId} - %m%n"));
 
                try {
-                       Document originConfig = OriginConfig.getOriginConfig(sce.getServletContext());
+                       Document originConfig = IdPConfigLoader.getIdPConfig(sce.getServletContext());
                        loadConfiguration(originConfig);
                } catch (ShibbolethConfigurationException e) {
                        sce.getServletContext().log("Problem setting up logging.", e);
index b15d5f2..33e3d28 100644 (file)
@@ -77,7 +77,7 @@ import edu.internet2.middleware.shibboleth.aa.arp.ArpProcessingException;
 import edu.internet2.middleware.shibboleth.aa.attrresolv.AttributeResolver;
 import edu.internet2.middleware.shibboleth.aa.attrresolv.AttributeResolverException;
 import edu.internet2.middleware.shibboleth.common.LocalPrincipal;
-import edu.internet2.middleware.shibboleth.common.OriginConfig;
+import edu.internet2.middleware.shibboleth.common.IdPConfigLoader;
 import edu.internet2.middleware.shibboleth.common.ShibbolethConfigurationException;
 import edu.internet2.middleware.shibboleth.idp.IdPConfig;
 import edu.internet2.middleware.shibboleth.xml.Parser;
@@ -219,7 +219,7 @@ public class ResolverTest
        {
                if (originxml != null) {
                        try {
-                               Document originConfig = OriginConfig.getOriginConfig(originxml);
+                               Document originConfig = IdPConfigLoader.getIdPConfig(originxml);
                                IdPConfig configuration = new IdPConfig(originConfig.getDocumentElement());
 
                                resolver = new AttributeResolver(configuration);
index 3664c73..55194e3 100644 (file)
@@ -33,7 +33,7 @@ require valid-user
 </p>
 
 <p>Because of the "require valid-user" rule, any user from a trusted
-origin-site is allowed access, once they establish a session using
+Identity Provider is allowed access, once they establish a session using
 Shibboleth.</p>
 
 <p>Here are some pieces of information I can tell about you using