*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
#include "saml2/binding/SAML2MessageDecoder.h"
#include "saml2/core/Protocols.h"
#include "saml2/metadata/Metadata.h"
#include "saml2/metadata/MetadataProvider.h"
#include "saml2/binding/SAML2MessageDecoder.h"
#include "saml2/core/Protocols.h"
#include "saml2/metadata/Metadata.h"
#include "saml2/metadata/MetadataProvider.h"
xmltooling::XMLObject* decode(
std::string& relayState,
const GenericRequest& genericRequest,
xmltooling::XMLObject* decode(
std::string& relayState,
const GenericRequest& genericRequest,
XMLByte* decoded=Base64::decode(reinterpret_cast<const XMLByte*>(msg),&x);
if (!decoded)
throw BindingException("Unable to decode base64 in POST binding message.");
XMLByte* decoded=Base64::decode(reinterpret_cast<const XMLByte*>(msg),&x);
if (!decoded)
throw BindingException("Unable to decode base64 in POST binding message.");
- log.debug("decoded SAML message:\n%s", decoded);
- istringstream is(reinterpret_cast<char*>(decoded));
- XMLString::release(&decoded);
+ log.debugStream() << "decoded SAML message:\n" << decoded << logging::eol;
XercesJanitor<DOMDocument> janitor(doc);
auto_ptr<XMLObject> xmlObject(XMLObjectBuilder::buildOneFromElement(doc->getDocumentElement(), true));
janitor.release();
XercesJanitor<DOMDocument> janitor(doc);
auto_ptr<XMLObject> xmlObject(XMLObjectBuilder::buildOneFromElement(doc->getDocumentElement(), true));
janitor.release();
RequestAbstractType* request = dynamic_cast<RequestAbstractType*>(xmlObject.get());
if (!request) {
response = dynamic_cast<StatusResponseType*>(xmlObject.get());
RequestAbstractType* request = dynamic_cast<RequestAbstractType*>(xmlObject.get());
if (!request) {
response = dynamic_cast<StatusResponseType*>(xmlObject.get());
// Run through the policy.
extractMessageDetails(*root, genericRequest, samlconstants::SAML20P_NS, policy);
// Run through the policy.
extractMessageDetails(*root, genericRequest, samlconstants::SAML20P_NS, policy);