Push SAML Attribute namespace configuration into the resolver. (Needed for proper...
[java-idp.git] / src / edu / internet2 / middleware / shibboleth / aa / attrresolv / provider / SAML2PersistentID.java
index d406531..4682f09 100644 (file)
@@ -241,9 +241,7 @@ public class SAML2PersistentID extends BaseAttributeDefinition implements Attrib
                        return;
                }
 
-               if (lifeTime != -1) {
-                       attribute.setLifetime(lifeTime);
-               }
+               standardProcessing(attribute);
 
                // Hash the data together to produce the persistent ID.
                try {
@@ -256,8 +254,11 @@ public class SAML2PersistentID extends BaseAttributeDefinition implements Attrib
 
                        // SAML2 persistent NameId format
                        try {
-                               Document placeHolder = DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument();
+                               DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();
+                               docFactory.setNamespaceAware(true);
+                               Document placeHolder = docFactory.newDocumentBuilder().newDocument();
                                Element nameIDNode = placeHolder.createElementNS(XML.SAML2ASSERT_NS, "NameID");
+                               nameIDNode.setAttribute("xmlns", XML.SAML2ASSERT_NS);
                                nameIDNode.setAttribute("Format", "urn:oasis:names:tc:SAML:2.0:nameid-format:persistent");
                                nameIDNode.setAttribute("NameQualifier", responder);
                                nameIDNode.setAttribute("SPNameQualifier", requester);
@@ -331,4 +332,4 @@ public class SAML2PersistentID extends BaseAttributeDefinition implements Attrib
 
                }
        }
-}
+}
\ No newline at end of file