robrichards / xmlseclibs

A PHP library for XML Security
BSD 3-Clause "New" or "Revised" License
387 stars 181 forks source link

Use an xpath query which ignores namespaces. #126

Closed txdv closed 7 years ago

txdv commented 7 years ago

The response I get using a specific service has a "wsu" prefix (http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd) which looks likes like this:

This patch makes it so it ignores all prefixes and just checks by if the name is Id.

robrichards commented 7 years ago

The patch breaks the spec. For it to be namespace aware and use attributes outside of the spec (including a namespace Id) you need to register the namespace (idNS) and specify additional attributes to look for (idKeys). This is a common issue for folks using xmldsig in a SOAP environment.

txdv commented 7 years ago

What method do I need to call to register an additional namespace?