X-Git-Url: http://www.project-moonshot.org/gitweb/?a=blobdiff_plain;f=saml%2Fsaml2%2Fbinding%2FSAML2SOAPClient.h;h=e7db60837c4eebde787a89fa5492de6a1a54b033;hb=f1208cd2f514700244816377443c4951dc22c848;hp=a890f94636b866c6ab72c748c9ff7355d2d88f9e;hpb=b4448d5b2445f818263b600651e67630ff114f22;p=shibboleth%2Fcpp-opensaml.git diff --git a/saml/saml2/binding/SAML2SOAPClient.h b/saml/saml2/binding/SAML2SOAPClient.h index a890f94..e7db608 100644 --- a/saml/saml2/binding/SAML2SOAPClient.h +++ b/saml/saml2/binding/SAML2SOAPClient.h @@ -1,17 +1,21 @@ -/* - * 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. - * You may obtain a copy of the License at +/** + * Licensed to the University Corporation for Advanced Internet + * Development, Inc. (UCAID) under one or more contributor license + * agreements. See the NOTICE file distributed with this work for + * additional information regarding copyright ownership. + * + * UCAID licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the + * License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, + * either express or implied. See the License for the specific + * language governing permissions and limitations under the License. */ /** @@ -23,9 +27,16 @@ #ifndef __saml2_soap11client_h__ #define __saml2_soap11client_h__ -#include +#include namespace opensaml { + + class SAML_API SOAPClient; + + namespace saml2md { + class SAML_API MetadataCredentialCriteria; + }; + namespace saml2p { class SAML_API RequestAbstractType; @@ -35,18 +46,18 @@ namespace opensaml { /** * Specialized SOAPClient for SAML 2.0 SOAP binding. */ - class SAML_API SAML2SOAPClient : public opensaml::SOAPClient + class SAML_API SAML2SOAPClient { public: /** - * Creates a SOAP client instance with a particular SecurityPolicy. + * Constructor * - * @param policy reference to SecurityPolicy to apply - * @param validating controls schema validation + * @param soaper reference to SOAPClient object to use for call + * @param fatalSAMLErrors true iff a non-successful SAML Status code should be fatal */ - SAML2SOAPClient(SecurityPolicy& policy, bool validating=false) : opensaml::SOAPClient(policy, validating) {} - - virtual ~SAML2SOAPClient() {} + SAML2SOAPClient(SOAPClient& soaper, bool fatalSAMLErrors=true); + + virtual ~SAML2SOAPClient(); /** * Specialized method for sending SAML 2.0 requests. The SOAP layer will be @@ -55,10 +66,11 @@ namespace opensaml { *

The request will be freed by the client object regardless of the outcome. * * @param request SAML request to send - * @param peer peer to send message to, expressed in metadata terms + * @param to peer to send message to, expressed in metadata criteria terms + * @param from identity of sending application * @param endpoint URL of endpoint to recieve message */ - virtual void sendSAML(RequestAbstractType* request, const saml2md::RoleDescriptor& peer, const char* endpoint); + virtual void sendSAML(RequestAbstractType* request, const char* from, saml2md::MetadataCredentialCriteria& to, const char* endpoint); /** * Specialized method for receiving SAML 2.0 responses. The SOAP layer will be @@ -78,6 +90,15 @@ namespace opensaml { * @return true iff the error should be treated as a fatal error */ virtual bool handleError(const Status& status); + + /** SOAP client object */ + SOAPClient& m_soaper; + + /** Flag controlling default error handler. */ + bool m_fatal; + + private: + XMLCh* m_correlate; }; };