00001
00002
00003 #ifndef __ARC_CLIENTSAML2SSO_H__
00004 #define __ARC_CLIENTSAML2SSO_H__
00005
00006 #include <string>
00007 #include <list>
00008
00009 #include <inttypes.h>
00010
00011 #include <arc/ArcConfig.h>
00012 #include <arc/URL.h>
00013 #include <arc/message/MCC_Status.h>
00014 #include <arc/message/PayloadRaw.h>
00015 #include <arc/message/PayloadSOAP.h>
00016 #include <arc/client/ClientInterface.h>
00017
00018 namespace Arc {
00019
00020 class ClientHTTPwithSAML2SSO {
00021 public:
00023 ClientHTTPwithSAML2SSO() : http_client_(NULL), authn_(false) {}
00024 ClientHTTPwithSAML2SSO(const BaseConfig& cfg, const URL& url);
00025 virtual ~ClientHTTPwithSAML2SSO();
00026
00028 MCC_Status process(const std::string& method, PayloadRawInterface *request,
00029 HTTPClientInfo *info, PayloadRawInterface **response,
00030 const std::string& idp_name, const std::string& username,
00031 const std::string& password, const bool reuse_authn = false);
00032 MCC_Status process(const std::string& method, const std::string& path,
00033 PayloadRawInterface *request,
00034 HTTPClientInfo *info, PayloadRawInterface **response,
00035 const std::string& idp_name, const std::string& username,
00036 const std::string& password, const bool reuse_authn = false);
00037 private:
00038 ClientHTTP *http_client_;
00039 bool authn_;
00040
00041 std::string cert_file_;
00042 std::string privkey_file_;
00043 std::string ca_file_;
00044 std::string ca_dir_;
00045 static Logger logger;
00046
00047 std::string cookie;
00048 };
00049
00050 class ClientSOAPwithSAML2SSO {
00051 public:
00053 ClientSOAPwithSAML2SSO() : soap_client_(NULL), authn_(false) {}
00054 ClientSOAPwithSAML2SSO(const BaseConfig& cfg, const URL& url);
00055 virtual ~ClientSOAPwithSAML2SSO();
00057 MCC_Status process(PayloadSOAP *request, PayloadSOAP **response,
00058 const std::string& idp_name, const std::string& username,
00059 const std::string& password, const bool reuse_authn = false);
00061 MCC_Status process(const std::string& action,
00062 PayloadSOAP *request, PayloadSOAP **response,
00063 const std::string& idp_name, const std::string& username,
00064 const std::string& password, const bool reuse_authn = false);
00065 private:
00066 ClientSOAP *soap_client_;
00067 bool authn_;
00068
00069 std::string cert_file_;
00070 std::string privkey_file_;
00071 std::string ca_file_;
00072 std::string ca_dir_;
00073 static Logger logger;
00074
00075 std::string cookie;
00076 };
00077
00078 }
00079
00080 #endif // __ARC_CLIENTSAML2SSO_H__