CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_2_9/src/CondCore/DBCommon/plugins/RelationalAuthenticationService.h

Go to the documentation of this file.
00001 #ifndef COND_XMLAUTHENTITACTIONSERVICE_H
00002 #define COND_XMLAUTHENTITACTIONSERVICE_H
00003 
00004 #include "CondCore/DBCommon/interface/CredentialStore.h"
00005 //
00006 #include "RelationalAccess/IAuthenticationService.h"
00007 #include "CoralKernel/Service.h"
00008 #include "CoralKernel/Property.h"
00009 //
00010 #include <map>
00011 #include <set>
00012 #include <string>
00013 
00014 namespace coral {
00015 
00016   class AuthenticationCredentials;
00017   //class IAuthenticationCredentials;
00018 }
00019 
00020 namespace cond {
00021 
00022   namespace RelationalAuthenticationService {
00023 
00026     class RelationalAuthenticationService : public coral::Service,
00027                                             virtual public coral::IAuthenticationService
00028     {
00029 
00030     public:
00032       explicit RelationalAuthenticationService( const std::string& name );   
00033 
00035       virtual ~RelationalAuthenticationService();
00036 
00037     public:
00038 
00040       void setAuthenticationPath(  const std::string& inputPath );
00041 
00046       const coral::IAuthenticationCredentials& credentials( const std::string& connectionString ) const;
00047 
00053       const coral::IAuthenticationCredentials& credentials( const std::string& connectionString,
00054                                                             const std::string& role ) const;
00055 
00056     private:
00057 
00059       std::string m_authenticationPath;
00060 
00062       mutable CredentialStore m_db;
00063 
00064       mutable coral_bridge::AuthenticationCredentialSet m_cache;
00065 
00066       coral::Property::CallbackID m_callbackID;
00067 
00068     };
00069 
00070   }
00071 
00072 }
00073 
00074 #endif