From 9e76849546147f22d6293f8bf5bcbfe6cc5f5f2d Mon Sep 17 00:00:00 2001 From: rudolf Date: Fri, 21 Jan 2005 18:11:46 +0000 Subject: used NS previx to NS mapping HashMap git-svn-id: https://joinup.ec.europa.eu/svn/moa-idspss/trunk@235 d688527b-c9ab-4aba-bd8d-4036d912da1d --- .../moa/id/auth/validator/IdentityLinkValidator.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/id.server/src/at/gv/egovernment/moa/id/auth/validator/IdentityLinkValidator.java b/id.server/src/at/gv/egovernment/moa/id/auth/validator/IdentityLinkValidator.java index 4c584f745..24029120e 100644 --- a/id.server/src/at/gv/egovernment/moa/id/auth/validator/IdentityLinkValidator.java +++ b/id.server/src/at/gv/egovernment/moa/id/auth/validator/IdentityLinkValidator.java @@ -1,5 +1,7 @@ package at.gv.egovernment.moa.id.auth.validator; +import java.util.HashMap; + import org.w3c.dom.Element; import org.w3c.dom.NodeList; @@ -132,15 +134,17 @@ public class IdentityLinkValidator implements Constants { "@AttributeNamespace", null); if (attributeName.equals("CitizenPublicKey")) { + if (attributeNS.equals("http://www.buergerkarte.at/namespaces/personenbindung/20020506#") || attributeNS.equals("urn:publicid:gv.at:namespaces:identitylink:1.2")) { Element attributeValue = - (Element) XPathUtils.selectSingleNode((Element) nl.item(i),SAML + "AttributeValue/" + DSIG + "RSAKeyValue"); + (Element) XPathUtils.selectSingleNode((Element) nl.item(i),nSMap, SAML + "AttributeValue/" + DSIG + "RSAKeyValue"); if (attributeValue==null) attributeValue = - (Element) XPathUtils.selectSingleNode((Element)nl.item(i), SAML + "AttributeValue/" + ECDSA + "ECDSAKeyValue"); - if (attributeValue == null) - throw new ValidateException("validator.02", null); + (Element) XPathUtils.selectSingleNode((Element)nl.item(i), nSMap, SAML + "AttributeValue/" + ECDSA + "ECDSAKeyValue"); + if (attributeValue == null) + throw new ValidateException("validator.02", null); + } else throw new ValidateException("validator.03", new Object [] {attributeNS} ); -- cgit v1.2.3