3 #include "RelationalAccess/AuthenticationCredentials.h"
4 #include "RelationalAccess/AuthenticationServiceException.h"
8 #include "RelationalAccess/AuthenticationServiceException.h"
9 #include "CoralKernel/IPropertyManager.h"
10 #include "CoralKernel/Property.h"
11 #include "CoralKernel/Context.h"
18 #include <boost/filesystem.hpp>
19 #include <boost/version.hpp>
20 #include <boost/bind.hpp>
22 #include "CoralBase/MessageStream.h"
26 m_authenticationPath(
""),
47 m_authenticationPath = inputPath;
51 const coral::IAuthenticationCredentials&
54 const coral::IAuthenticationCredentials* creds = m_cache.get( connectionString );
56 std::string credsStoreConn = m_db.setUpForConnectionString( connectionString, m_authenticationPath );
57 coral::MessageStream
log(
"cond::RelationalAuthenticationService::credentials");
58 log <<
coral::Debug <<
"Connecting to the credential repository in \"" << credsStoreConn <<
"\" with principal \""<<m_db.keyPrincipalName()<<
"\"."<<coral::MessageStream::endmsg;
59 m_db.selectForUser( m_cache );
61 creds = m_cache.get( connectionString );
64 msg += connectionString +
"\"";
65 msg +=
" with role \"COND_DEFAULT_ROLE\" is not available for ";
66 msg +=m_db.keyPrincipalName();
67 cond::throwException( msg,
"cond::RelationalAuthenticationService::RelationalAuthenticationService::credentials" );
72 const coral::IAuthenticationCredentials&
76 const coral::IAuthenticationCredentials* creds = m_cache.get( connectionString, role );
78 std::string credsStoreConn = m_db.setUpForConnectionString( connectionString, m_authenticationPath );
79 coral::MessageStream
log(
"cond::RelationalAuthenticationService::credentials");
80 log <<
coral::Debug <<
"Connecting to the credential repository in \"" << credsStoreConn <<
"\" with principal \""<<m_db.keyPrincipalName()<<
"\"."<<coral::MessageStream::endmsg;
81 m_db.selectForUser( m_cache );
83 creds = m_cache.get( connectionString, role );
86 msg += connectionString +
"\"";
87 msg +=
" with role \"" + role +
"\" is not available for ";
88 msg +=m_db.keyPrincipalName();
89 cond::throwException( msg,
"cond::RelationalAuthenticationService::RelationalAuthenticationService::credentials" );
coral::Property::CallbackID m_callbackID
static PFTauRenderPlugin instance
virtual ~RelationalAuthenticationService()
Standard Destructor.
static constexpr const char *const COND_AUTH_PATH_PROPERTY
void throwException(const std::string &message, const std::string &methodName)
#define DEFINE_CORALSERVICE(type, name)
void setAuthenticationPath(const std::string &inputPath)
Sets the input file name.
string key
FastSim: produces sample of signal events, overlayed with premixed minbias events.
const coral::IAuthenticationCredentials & credentials(const std::string &connectionString) const
RelationalAuthenticationService(const std::string &name)
Standard Constructor.