Refactor token resolution, add a protocol override.
[shibboleth/cpp-sp-resolver.git] / src / shibresolver / resolver.h
index 3eee765..68f466b 100644 (file)
@@ -26,8 +26,8 @@
 
 #include <shibsp/RequestMapper.h>
 #include <shibsp/SPConfig.h>
+#include <xmltooling/unicode.h>
 
-#include <string>
 #include <vector>
 
 #ifdef SHIBRESOLVER_HAVE_GSSGNU
@@ -90,6 +90,13 @@ namespace shibresolver {
         void setIssuer(const char* issuer);
 
         /**
+         * Sets the metadata protocol constant to use for resolution.
+         *
+         * @param protocol  metadata protocol constant
+         */
+        void setProtocol(const XMLCh* protocol);
+
+        /**
          * Adds an XML token as input to the resolver, generally a SAML assertion.
          * <p>The caller retains ownership of the object.
          *
@@ -200,6 +207,9 @@ namespace shibresolver {
         /** Source of identity, if known. */
         std::string m_issuer;
 
+        /** Metadata protocol constant to use. */
+        xmltooling::xstring m_protocol;
+
         /** Input tokens. */
         std::vector<const xmltooling::XMLObject*> m_tokens;