X-Git-Url: http://www.project-moonshot.org/gitweb/?a=blobdiff_plain;f=saml%2Fbinding%2FSOAPClient.h;h=52a784501d467f53671044780770782ed10f427b;hb=46ac496b77b850309c07e732ff89fa41c776915d;hp=e2d741d303add9079e78dac16fbf8c694dbd02da;hpb=8131124adcd9927d04a563e3159914d8670ff306;p=shibboleth%2Fcpp-opensaml.git diff --git a/saml/binding/SOAPClient.h b/saml/binding/SOAPClient.h index e2d741d..52a7845 100644 --- a/saml/binding/SOAPClient.h +++ b/saml/binding/SOAPClient.h @@ -24,6 +24,7 @@ #define __saml_soap11client_h__ #include +#include #include namespace opensaml { @@ -38,12 +39,13 @@ namespace opensaml { * Creates a SOAP client instance with a particular SecurityPolicy. * * @param policy reference to SecurityPolicy to apply - * @param validating controls schema validation */ - SOAPClient(SecurityPolicy& policy, bool validating=false) - : soap11::SOAPClient(validating), m_policy(policy), m_force(true), m_peer(NULL) {} + SOAPClient(SecurityPolicy& policy) + : soap11::SOAPClient(policy.getValidating()), m_policy(policy), m_force(true), m_peer(NULL), m_criteria(NULL) { + } - virtual ~SOAPClient() {} + virtual ~SOAPClient() { + } /** * Controls whether to force transport/peer authentication via an X509TrustEngine. @@ -56,15 +58,18 @@ namespace opensaml { m_force = force; } + using soap11::SOAPClient::send; + /** - * Override prepares the SecurityPolicy by clearing Issuer identity, in case the policy - * is reused. + * SAML-specific method uses a RoleDescriptor to determine the peer name and prepare the + * transport layer with peer credential information. The SecurityPolicy is also reset, + * in case the policy is reused. * * @param env SOAP envelope to send - * @param peer peer to send message to, expressed in TrustEngine terms + * @param peer peer to send message to, expressed in metadata criteria terms * @param endpoint URL of endpoint to recieve message */ - void send(const soap11::Envelope& env, const xmltooling::KeyInfoSource& peer, const char* endpoint); + virtual void send(const soap11::Envelope& env, saml2md::MetadataCredentialCriteria& peer, const char* endpoint); /** * Override applies SecurityPolicy to envelope before returning it. @@ -91,7 +96,7 @@ namespace opensaml { * * @param transport reference to transport layer */ - void prepareTransport(const xmltooling::SOAPTransport& transport); + void prepareTransport(xmltooling::SOAPTransport& transport); /** Reference to security policy to apply. */ SecurityPolicy& m_policy; @@ -101,6 +106,9 @@ namespace opensaml { /** Metadata-based peer identity. */ const saml2md::RoleDescriptor* m_peer; + + /** Metadata-based CredentialCriteria for supplying credentials to TrustEngine. */ + saml2md::MetadataCredentialCriteria* m_criteria; }; };