Make config data in Credentials and NameMapper work with namespaces.
authorwassa <wassa@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Thu, 22 Jan 2004 19:00:09 +0000 (19:00 +0000)
committerwassa <wassa@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Thu, 22 Jan 2004 19:00:09 +0000 (19:00 +0000)
git-svn-id: https://subversion.switch.ch/svn/shibboleth/java-idp/trunk@841 ab3bd59b-922f-494d-bb5f-6f0a3c29deca

src/edu/internet2/middleware/shibboleth/common/Credentials.java
src/edu/internet2/middleware/shibboleth/common/NameMapper.java

index 3d9e16e..d3cafc3 100644 (file)
@@ -97,7 +97,8 @@ public class Credentials {
 
        public Credentials(Element e) {
 
-               if (!e.getTagName().equals("Credentials")) {
+               if (!e.getTagName().equals("Credentials")
+                       && (!(e.getNamespaceURI().equals(Credentials.credentialsNamespace)) || !e.getTagName().endsWith(":Credentials"))) {
                        throw new IllegalArgumentException();
                }
 
index 9e6dca2..336862c 100644 (file)
@@ -136,8 +136,10 @@ public class NameMapper {
         *             supplied configuration
         */
        public void addNameMapping(Element e) throws NameIdentifierMappingException {
-
-               if (!e.getTagName().equals("NameMapping")) {
+               
+               if (!e.getTagName().equals("NameMapping")
+                       && (!(e.getNamespaceURI().equals(NameIdentifierMapping.mappingNamespace))
+                               || !e.getTagName().endsWith(":NameMapping"))) {
                        throw new IllegalArgumentException();
                }