#include <istream>
#include <xmltooling/XMLObject.h>
-#include <xmltooling/signature/CredentialResolver.h>
+#include <xmltooling/security/Credential.h>
namespace opensaml {
virtual ~MessageEncoder() {}
/**
+ * Indicates whether the encoding format requires that messages be as compact as possible.
+ *
+ * @return true iff the encoding has size constraints
+ */
+ virtual bool isCompact() const {
+ return false;
+ }
+
+ /**
* Interface to caller-supplied artifact generation mechanism.
*
* Generating an artifact for storage and retrieval requires knowledge of
* @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 long encode(
GenericResponse& genericResponse,
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;
};