X-Git-Url: http://www.project-moonshot.org/gitweb/?a=blobdiff_plain;f=saml%2Fbinding%2FMessageEncoder.h;h=ad87a084fd194fc18e28654312b2cd88199bbbc0;hb=f3a43f14f9dd53428f9e879bb489d6a4cf2674a8;hp=4d23033b3f88936621e961862dc8d6de72cf3a48;hpb=b66d32ed939fcf6db7bc52c8626b6ac06a2e97f9;p=shibboleth%2Fcpp-opensaml.git diff --git a/saml/binding/MessageEncoder.h b/saml/binding/MessageEncoder.h index 4d23033..ad87a08 100644 --- a/saml/binding/MessageEncoder.h +++ b/saml/binding/MessageEncoder.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. @@ -23,12 +23,11 @@ #ifndef __saml_encoder_h__ #define __saml_encoder_h__ -#include +#include -#include -#include +#include #include -#include +#include namespace opensaml { @@ -92,7 +91,7 @@ namespace opensaml { } /** - * Encodes an XML object/message into a set of binding-specific data "fields". + * Encodes an XML object/message into a binding- and transport-specific response. * The XML content cannot have a parent object, and any existing references to * the content will be invalidated if the encode method returns successfully. * @@ -100,49 +99,32 @@ namespace opensaml { * binding-specific manner. The CredentialResolver MUST * be locked by the caller. * - *

An embedded URLEncoder instance may be required by some bindings - * in order to produce predictable signature input. - * *

Artifact-based bindings require an ArtifactGenerator be set to * produce an artifact suitable for the intended recipient. * - *

Note that the name/value pairs resulting from the encoding operation are - * NOT URL-encoded or otherwise transformed. It is the caller's - * responsibility to apply any necessary encoding when preparing the data for - * transport. - * - * @param outputFields name/value pairs containing the results of encoding the message - * @param xmlObject XML object/message to encode + * @param genericResponse reference to interface for sending transport response + * @param xmlObject XML message to encode + * @param destination destination URL for message * @param recipientID optional entityID of message recipient * @param relayState optional RelayState value to accompany message - * @param credResolver optional CredentialResolver instance to supply signing material - * @param sigAlgorithm optional signature algorithm identifier + * @param credential optional Credential to supply signing key + * @param signatureAlg optional signature algorithm identifier + * @param digestAlg optional reference digest algorithm identifier */ - virtual void encode( - std::map& outputFields, + virtual long encode( + GenericResponse& genericResponse, xmltooling::XMLObject* xmlObject, + const char* destination, const char* recipientID=NULL, const char* relayState=NULL, - const xmlsignature::CredentialResolver* credResolver=NULL, - const XMLCh* sigAlgorithm=NULL + const xmltooling::Credential* credential=NULL, + const XMLCh* signatureAlg=NULL, + const XMLCh* digestAlg=NULL ) const=0; protected: MessageEncoder() : m_artifactGenerator(NULL) {} - /** - * Helper function to build a new XML Signature with KeyInfo, based - * on the supplied CredentialResolver. - * - * @param credResolver CredentialResolver instance to supply signing material - * @param sigAlgorithm optional signature algorithm identifier - * @return a new Signature object - */ - xmlsignature::Signature* buildSignature( - const xmlsignature::CredentialResolver* credResolver, - const XMLCh* sigAlgorithm=NULL - ) const; - /** Pointer to an ArtifactGenerator implementation. */ const ArtifactGenerator* m_artifactGenerator; };