Back to index

nordugrid-arc-nox  1.1.0~rc6
Public Member Functions | Private Attributes | Static Private Attributes
Arc::ClientSOAPwithSAML2SSO Class Reference

#include <ClientSAML2SSO.h>

Collaboration diagram for Arc::ClientSOAPwithSAML2SSO:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 ClientSOAPwithSAML2SSO ()
 Constructor creates MCC chain and connects to server.
 ClientSOAPwithSAML2SSO (const BaseConfig &cfg, const URL &url)
virtual ~ClientSOAPwithSAML2SSO ()
MCC_Status process (PayloadSOAP *request, PayloadSOAP **response, const std::string &idp_name, const std::string &username, const std::string &password, const bool reuse_authn=false)
 Send SOAP request and receive response.
MCC_Status process (const std::string &action, PayloadSOAP *request, PayloadSOAP **response, const std::string &idp_name, const std::string &username, const std::string &password, const bool reuse_authn=false)
 Send SOAP request with specified SOAP action and receive response.

Private Attributes

ClientSOAPsoap_client_
bool authn_
std::string cert_file_
std::string privkey_file_
std::string ca_file_
std::string ca_dir_
std::string cookie

Static Private Attributes

static Logger logger

Detailed Description

Definition at line 50 of file ClientSAML2SSO.h.


Constructor & Destructor Documentation

Constructor creates MCC chain and connects to server.

Definition at line 53 of file ClientSAML2SSO.h.

{}

Definition at line 363 of file ClientSAML2SSO.cpp.

    : soap_client_(NULL),
      authn_(false) {
    soap_client_ = new ClientSOAP(cfg, url);
    //Use the credential and trusted certificates from client's main chain to
    //contact IdP
    cert_file_ = cfg.cert;
    privkey_file_ = cfg.key;
    ca_file_ = cfg.cafile;
    ca_dir_ = cfg.cadir;
  }

Definition at line 376 of file ClientSAML2SSO.cpp.

                                                  {
    if (soap_client_)
      delete soap_client_;
  }

Member Function Documentation

MCC_Status Arc::ClientSOAPwithSAML2SSO::process ( PayloadSOAP request,
PayloadSOAP **  response,
const std::string &  idp_name,
const std::string &  username,
const std::string &  password,
const bool  reuse_authn = false 
)

Send SOAP request and receive response.

Definition at line 381 of file ClientSAML2SSO.cpp.

                                                                                                {
    return process("", request, response, idp_name, username, password, reuse_authn);
  }

Here is the caller graph for this function:

MCC_Status Arc::ClientSOAPwithSAML2SSO::process ( const std::string &  action,
PayloadSOAP request,
PayloadSOAP **  response,
const std::string &  idp_name,
const std::string &  username,
const std::string &  password,
const bool  reuse_authn = false 
)

Send SOAP request with specified SOAP action and receive response.

Definition at line 387 of file ClientSAML2SSO.cpp.

                                                                     {
    //Do the saml2sso
    if (!authn_) { //If has not yet passed the saml2sso process
      ClientHTTP *http_client = dynamic_cast<ClientHTTP*>(soap_client_);
      Arc::MCC_Status status = process_saml2sso(idp_name, username, password,
                                                http_client, cert_file_, privkey_file_, 
                                                ca_file_, ca_dir_, logger, cookie);
      if (!status) {
        logger.msg(Arc::ERROR, "SAML2SSO process failed");
        return MCC_Status();
      }
      if(reuse_authn) authn_ = true;  //Reuse or not reuse the result from saml2sso
    }
    //Send the real message
    Arc::MCC_Status status = soap_client_->process(action, request, response);
    return status;
  }

Here is the call graph for this function:


Member Data Documentation

Definition at line 67 of file ClientSAML2SSO.h.

std::string Arc::ClientSOAPwithSAML2SSO::ca_dir_ [private]

Definition at line 72 of file ClientSAML2SSO.h.

Definition at line 71 of file ClientSAML2SSO.h.

Definition at line 69 of file ClientSAML2SSO.h.

std::string Arc::ClientSOAPwithSAML2SSO::cookie [private]

Definition at line 75 of file ClientSAML2SSO.h.

Definition at line 73 of file ClientSAML2SSO.h.

Definition at line 70 of file ClientSAML2SSO.h.

Definition at line 66 of file ClientSAML2SSO.h.


The documentation for this class was generated from the following files: