Back to index

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

#include <ClientSAML2SSO.h>

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

List of all members.

Public Member Functions

 ClientHTTPwithSAML2SSO ()
 Constructor creates MCC chain and connects to server.
 ClientHTTPwithSAML2SSO (const BaseConfig &cfg, const URL &url)
virtual ~ClientHTTPwithSAML2SSO ()
MCC_Status process (const std::string &method, PayloadRawInterface *request, HTTPClientInfo *info, PayloadRawInterface **response, const std::string &idp_name, const std::string &username, const std::string &password, const bool reuse_authn=false)
 Send HTTP request and receive response.
MCC_Status process (const std::string &method, const std::string &path, PayloadRawInterface *request, HTTPClientInfo *info, PayloadRawInterface **response, const std::string &idp_name, const std::string &username, const std::string &password, const bool reuse_authn=false)

Private Attributes

ClientHTTPhttp_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 20 of file ClientSAML2SSO.h.


Constructor & Destructor Documentation

Constructor creates MCC chain and connects to server.

Definition at line 23 of file ClientSAML2SSO.h.

{}

Definition at line 26 of file ClientSAML2SSO.cpp.

    : http_client_(NULL),
      authn_(false) {

    http_client_ = new ClientHTTP(cfg, url, 60);
    //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 40 of file ClientSAML2SSO.cpp.

                                                  {
    if (http_client_)
      delete http_client_;
  }

Member Function Documentation

MCC_Status Arc::ClientHTTPwithSAML2SSO::process ( const std::string &  method,
PayloadRawInterface request,
HTTPClientInfo info,
PayloadRawInterface **  response,
const std::string &  idp_name,
const std::string &  username,
const std::string &  password,
const bool  reuse_authn = false 
)

Send HTTP request and receive response.

Definition at line 332 of file ClientSAML2SSO.cpp.

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

Here is the caller graph for this function:

MCC_Status Arc::ClientHTTPwithSAML2SSO::process ( const std::string &  method,
const std::string &  path,
PayloadRawInterface request,
HTTPClientInfo info,
PayloadRawInterface **  response,
const std::string &  idp_name,
const std::string &  username,
const std::string &  password,
const bool  reuse_authn = false 
)

Definition at line 341 of file ClientSAML2SSO.cpp.

                                                                     {
    if (!authn_) { //If has not yet passed the saml2sso process
      //Do the saml2sso
      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 = http_client_->process(method, path, request, info, response);
    return status;
  }

Here is the call graph for this function:


Member Data Documentation

Definition at line 39 of file ClientSAML2SSO.h.

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

Definition at line 44 of file ClientSAML2SSO.h.

Definition at line 43 of file ClientSAML2SSO.h.

Definition at line 41 of file ClientSAML2SSO.h.

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

Definition at line 47 of file ClientSAML2SSO.h.

Definition at line 38 of file ClientSAML2SSO.h.

Definition at line 45 of file ClientSAML2SSO.h.

Definition at line 42 of file ClientSAML2SSO.h.


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