X-Git-Url: http://www.project-moonshot.org/gitweb/?a=blobdiff_plain;f=samltest%2Fbinding.h;h=33551445b74205cc625fcdee853ab6d60daf0738;hb=5d38a7bf41f369d21b722890fa72de5eae8e944b;hp=a1c6d199f1667246fde46ad1da074ba386ef62e6;hpb=9e8c8ba21f28fe4a5ed0fb8573588523ca3c0a0d;p=shibboleth%2Fcpp-opensaml.git diff --git a/samltest/binding.h b/samltest/binding.h index a1c6d19..3355144 100644 --- a/samltest/binding.h +++ b/samltest/binding.h @@ -1,5 +1,5 @@ /* - * Copyright 2001-2006 Internet2 + * Copyright 2001-2007 Internet2 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,12 +22,13 @@ #include #include #include -#include #include #include #include +#include using namespace opensaml::saml2md; +using namespace opensaml; using namespace xmlsignature; class SAMLBindingBaseTestCase : public HTTPRequest, public HTTPResponse @@ -190,18 +191,10 @@ public: // HTTPResponse methods - void setHeader(const char* name, const char* value) { + void setResponseHeader(const char* name, const char* value) { m_headers[name] = value ? value : ""; } - void setContentType(const char* type) { - setHeader("Content-Type", type); - } - - void setCookie(const char* name, const char* value) { - m_headers["Set-Cookie"] = string(name) + "=" + (value ? value : ""); - } - // The amount of error checking missing from this is incredible, but as long // as the test data isn't unexpected or malformed, it should work. @@ -220,7 +213,7 @@ public: pch=strchr(pch,'&'); if (pch) *pch++=0; - SAMLConfig::getConfig().getURLEncoder()->decode(value); + XMLToolingConfig::getConfig().getURLEncoder()->decode(value); m_fields[name] = value; name = pch; } @@ -256,14 +249,6 @@ public: return decoded; } - long sendResponse(std::istream& inputStream) { - return sendResponse(inputStream, HTTPResponse::SAML_HTTP_STATUS_OK); - } - - long sendError(std::istream& inputStream) { - return sendResponse(inputStream, HTTPResponse::SAML_HTTP_STATUS_ERROR); - } - long sendResponse(std::istream& inputStream, long status) { m_method="POST"; string page,line;