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_krb_object.hpp
Go to the documentation of this file.
1 #ifndef _KRB_AUTH_OBJECT_HPP_
2 #define _KRB_AUTH_OBJECT_HPP_
3 
4 #include "irods_error.hpp"
5 #include "irods_auth_object.hpp"
6 #include "irods_stacktrace.hpp"
7 
8 #include <gssapi.h>
9 
10 namespace irods {
11 
12 // constant key for krb auth object
13  const std::string KRB_AUTH_PLUGIN( "KRB" );
14  const std::string AUTH_KRB_SCHEME( "krb" );
15 
19  class krb_auth_object : public auth_object {
20  public:
22  krb_auth_object( rError_t* _r_error );
23  virtual ~krb_auth_object();
24 
25  // Accessors
26 
28  virtual gss_cred_id_t creds( void ) const {
29  return creds_;
30  }
31 
33  virtual int sock( void ) const {
34  return sock_;
35  }
36 
38  virtual const std::string& service_name( void ) const {
39  return service_name_;
40  }
41 
43  virtual const std::string& digest( void ) const {
44  return digest_;
45  }
46 
50 
51  // Mutators
52 
54  virtual void creds( gss_cred_id_t _creds ) {
55  creds_ = _creds;
56  }
57 
59  virtual void sock( int s ) {
60  sock_ = s;
61  }
62 
64  virtual void service_name( const std::string& s ) {
65  service_name_ = s;
66  }
67 
69  virtual void digest( const std::string& d ) {
70  digest_ = d;
71  }
72 
73  // Methods
74 
76  error resolve( const std::string& _name, plugin_ptr& _plugin ); // resolve plugin
77 
79  bool operator==( const krb_auth_object& _rhs ) const;
80 
81 
82  private:
83  gss_cred_id_t creds_;
84  int sock_;
85  std::string service_name_;
86  std::string digest_;
87  };
88 
89  typedef boost::shared_ptr<krb_auth_object> krb_auth_object_ptr;
90 
91 }; // namespace irods
92 
93 #endif // _KRB_AUTH_OBJECT_HPP_
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::krb_auth_object
Definition: irods_krb_object.hpp:19
irods::krb_auth_object::~krb_auth_object
virtual ~krb_auth_object()
Definition: irods_krb_object.cpp:18
irods::krb_auth_object::digest
virtual void digest(const std::string &d)
Definition: irods_krb_object.hpp:69
irods_stacktrace.hpp
irods::krb_auth_object::sock
virtual void sock(int s)
Definition: irods_krb_object.hpp:59
irods::krb_auth_object::sock_
int sock_
Definition: irods_krb_object.hpp:84
irods::krb_auth_object::service_name
virtual void service_name(const std::string &s)
Definition: irods_krb_object.hpp:64
irods::krb_auth_object_ptr
boost::shared_ptr< krb_auth_object > krb_auth_object_ptr
Definition: irods_krb_object.hpp:89
irods::krb_auth_object::creds_
gss_cred_id_t creds_
Definition: irods_krb_object.hpp:83
irods_auth_object.hpp
irods::krb_auth_object::krb_auth_object
krb_auth_object(rError_t *_r_error)
Definition: irods_krb_object.cpp:11
rError_t
Definition: rodsError.h:24
irods
Definition: apiHandler.hpp:35
irods::krb_auth_object::resolve
error resolve(const std::string &_name, plugin_ptr &_plugin)
Definition: irods_krb_object.cpp:22
irods::krb_auth_object::get_re_vars
virtual error get_re_vars(rule_engine_vars_t &)
Definition: irods_krb_object.cpp:53
irods::error
Definition: irods_error.hpp:23
irods::krb_auth_object::digest
virtual const std::string & digest(void) const
Definition: irods_krb_object.hpp:43
irods::krb_auth_object::creds
virtual void creds(gss_cred_id_t _creds)
Definition: irods_krb_object.hpp:54
irods::krb_auth_object::service_name_
std::string service_name_
Definition: irods_krb_object.hpp:85
irods::krb_auth_object::operator==
bool operator==(const krb_auth_object &_rhs) const
Definition: irods_krb_object.cpp:46
irods::krb_auth_object::sock
virtual int sock(void) const
Definition: irods_krb_object.hpp:33
irods_error.hpp
irods::AUTH_KRB_SCHEME
const std::string AUTH_KRB_SCHEME("krb")
irods::krb_auth_object::creds
virtual gss_cred_id_t creds(void) const
Definition: irods_krb_object.hpp:28
irods::krb_auth_object::digest_
std::string digest_
Definition: irods_krb_object.hpp:86
irods::KRB_AUTH_PLUGIN
const std::string KRB_AUTH_PLUGIN("KRB")
irods::rule_engine_vars_t
std::map< std::string, std::string > rule_engine_vars_t
Definition: irods_first_class_object.hpp:20
irods::krb_auth_object::service_name
virtual const std::string & service_name(void) const
Definition: irods_krb_object.hpp:38