X-Git-Url: http://www.project-moonshot.org/gitweb/?a=blobdiff_plain;f=saml%2Fbinding%2FSOAPClient.h;h=ddbe2e1e0a485f4419ee53675ee4108cf0829d73;hb=b1614d3c1fc1f4230ab2a123f43994127c25462c;hp=e2d741d303add9079e78dac16fbf8c694dbd02da;hpb=8131124adcd9927d04a563e3159914d8670ff306;p=shibboleth%2Fcpp-opensaml.git diff --git a/saml/binding/SOAPClient.h b/saml/binding/SOAPClient.h index e2d741d..ddbe2e1 100644 --- a/saml/binding/SOAPClient.h +++ b/saml/binding/SOAPClient.h @@ -24,6 +24,7 @@ #define __saml_soap11client_h__ #include +#include #include namespace opensaml { @@ -40,10 +41,12 @@ namespace opensaml { * @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. @@ -57,14 +60,15 @@ namespace opensaml { } /** - * 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); + void send(const soap11::Envelope& env, saml2md::MetadataCredentialCriteria& peer, const char* endpoint); /** * Override applies SecurityPolicy to envelope before returning it. @@ -91,7 +95,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 +105,9 @@ namespace opensaml { /** Metadata-based peer identity. */ const saml2md::RoleDescriptor* m_peer; + + /** Metadata-based CredentialCriteria for supplying credentials to TrustEngine. */ + saml2md::MetadataCredentialCriteria* m_criteria; }; };