2 * Licensed to the University Corporation for Advanced Internet
3 * Development, Inc. (UCAID) under one or more contributor license
4 * agreements. See the NOTICE file distributed with this work for
5 * additional information regarding copyright ownership.
7 * UCAID licenses this file to you under the Apache License,
8 * Version 2.0 (the "License"); you may not use this file except
9 * in compliance with the License. You may obtain a copy of the
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * Unless required by applicable law or agreed to in writing,
15 * software distributed under the License is distributed on an
16 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
17 * either express or implied. See the License for the specific
18 * language governing permissions and limitations under the License.
22 * @file saml/saml1/binding/SAML1SOAPClient.h
24 * Client class for SAML 1.x SOAP binding.
27 #ifndef __saml1_soap11client_h__
28 #define __saml1_soap11client_h__
30 #include <saml/base.h>
34 class SAML_API SOAPClient;
37 class SAML_API MetadataCredentialCriteria;
42 class SAML_API Request;
43 class SAML_API Response;
44 class SAML_API Status;
47 * Client class for SAML 1.x SOAP binding.
49 class SAML_API SAML1SOAPClient
55 * @param soaper reference to SOAPClient object to use for call
56 * @param fatalSAMLErrors true iff a non-successful SAML Status code should be fatal
58 SAML1SOAPClient(SOAPClient& soaper, bool fatalSAMLErrors=true);
60 virtual ~SAML1SOAPClient();
63 * Specialized method for sending SAML 1.x requests. The SOAP layer will be
64 * constructed automatically.
66 * <p>The request will be freed by the client object regardless of the outcome.
68 * @param request SAML request to send
69 * @param from identity of sending application
70 * @param to peer to send message to, expressed in metadata criteria terms
71 * @param endpoint URL of endpoint to recieve message
73 virtual void sendSAML(Request* request, const char* from, saml2md::MetadataCredentialCriteria& to, const char* endpoint);
76 * Specialized method for receiving SAML 1.x responses. The SOAP layer will be
77 * evaluated automatically, and the attached policy will be applied to the Response.
79 * <p>The caller is responsible for freeing the Response.
81 * @return SAML 1.x Response, after SecurityPolicy has been applied
83 virtual Response* receiveSAML();
87 * Handling of SAML errors.
89 * @param status SAML Status received by client
90 * @return true iff the error should be treated as a fatal error
92 virtual bool handleError(const Status& status);
94 /** SOAP client object. */
97 /** Flag controlling default error handler. */
107 #endif /* __saml1_soap11client_h__ */