irods  4.2.8
About: iRODS (the integrated Rule Oriented Data System) is a distributed data-management system for creating data grids, digital libraries, persistent archives, and real-time data systems.
  Fossies Dox: irods-4.2.8.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

irods_generic_auth_object.cpp
Go to the documentation of this file.
1 #include "irods_auth_manager.hpp"
2 #include "irods_auth_plugin.hpp"
4 
5 extern int ProcessType;
6 
7 namespace irods {
8 
10  const std::string& _type,
11  rError_t* _r_error ) :
12  auth_object( _r_error ),
13  type_( _type ),
14  sock_( 0 ) {
15 
16  } // constructor
17 
19  const generic_auth_object& _rhs ) :
20  auth_object( _rhs ), type_( _rhs.type_ ) {
21 
22  } // constructor
23 
25 
26  } // destructor
27 
28 
30  const std::string& _interface,
31  plugin_ptr& _plugin ) {
32 
33  if ( AUTH_INTERFACE != _interface ) {
34  std::stringstream msg;
35  msg << "generic_auth_object does not support a [";
36  msg << _interface;
37  msg << "] plugin interface";
38  return ERROR( SYS_INVALID_INPUT_PARAM, msg.str() );
39  }
40 
41  auth_ptr auth_p;
42  error ret = auth_mgr.resolve( type_, auth_p );
43  if ( !ret.ok() ) {
44  std::string empty_context("");
47  type_,
48  type_,
49  type_,
50  empty_context,
51  auth_p );
52 
53  if ( !ret.ok() ) {
54  return PASS( ret );
55  }
56  else {
57  _plugin = boost::dynamic_pointer_cast<plugin_base>( auth_p );
58  return SUCCESS();
59  }
60  }
61 
62  _plugin = boost::dynamic_pointer_cast<plugin_base>( auth_p );
63  return SUCCESS();
64  }
65 
67  const generic_auth_object& _rhs ) const {
68  return false;
69  }
70 
72  const generic_auth_object& _rhs ) {
73  return *this;
74  }
75 
77  rule_engine_vars_t& _kvp ) {
78 
79  return SUCCESS();
80  }
81 }
ProcessType
int ProcessType
Definition: rcGlobal.cpp:16
irods::plugin_ptr
boost::shared_ptr< plugin_base > plugin_ptr
Definition: irods_first_class_object.hpp:18
irods::auth_object
Definition: irods_auth_object.hpp:16
irods::auth_manager::init_from_type
error init_from_type(const int &, const std::string &_type, const std::string &_key, const std::string &_inst, const std::string &_ctx, auth_ptr &_rtn_auth)
Definition: irods_auth_manager.cpp:65
PASS
#define PASS(prev_error_)
Definition: irods_error.hpp:118
irods::generic_auth_object
Definition: irods_generic_auth_object.hpp:15
irods::AUTH_INTERFACE
const std::string AUTH_INTERFACE("irods_auth_interface")
SYS_INVALID_INPUT_PARAM
@ SYS_INVALID_INPUT_PARAM
Definition: rodsErrorTable.h:195
SUCCESS
#define SUCCESS()
Definition: irods_error.hpp:121
irods::generic_auth_object::generic_auth_object
generic_auth_object(const std::string &_type, rError_t *_r_error)
Definition: irods_generic_auth_object.cpp:9
rError_t
Definition: rodsError.h:24
irods::generic_auth_object::operator=
virtual generic_auth_object & operator=(const generic_auth_object &_rhs)
Definition: irods_generic_auth_object.cpp:71
irods::generic_auth_object::type_
std::string type_
Definition: irods_generic_auth_object.hpp:45
irods
Definition: apiHandler.hpp:35
irods_generic_auth_object.hpp
irods::generic_auth_object::~generic_auth_object
virtual ~generic_auth_object()
Definition: irods_generic_auth_object.cpp:24
irods_auth_manager.hpp
irods::auth_manager::resolve
error resolve(const std::string &_key, auth_ptr &_value)
Definition: irods_auth_manager.cpp:22
ERROR
#define ERROR(code_, message_)
Definition: irods_error.hpp:117
irods::error
Definition: irods_error.hpp:23
irods_auth_plugin.hpp
irods::generic_auth_object::resolve
virtual error resolve(const std::string &_name, plugin_ptr &_plugin)
Definition: irods_generic_auth_object.cpp:29
irods::generic_auth_object::operator==
virtual bool operator==(const generic_auth_object &_rhs) const
Definition: irods_generic_auth_object.cpp:66
irods::auth_mgr
auth_manager auth_mgr
Definition: irods_auth_manager.cpp:7
irods::generic_auth_object::get_re_vars
virtual error get_re_vars(rule_engine_vars_t &)
Definition: irods_generic_auth_object.cpp:76
irods::error::ok
bool ok()
Definition: irods_error.cpp:258
irods::auth_ptr
boost::shared_ptr< auth > auth_ptr
Definition: irods_auth_types.hpp:19
irods::rule_engine_vars_t
std::map< std::string, std::string > rule_engine_vars_t
Definition: irods_first_class_object.hpp:20