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");
59 m_db.selectForUser( m_cache );
61 creds = m_cache.get( connectionString );
63 std::string
msg(
"No Authentication available for connection=\"");
64 msg += connectionString +
"\".";
65 throw coral::AuthenticationServiceException( msg,
"cond::RelationalAuthenticationService::RelationalAuthenticationService::credentials",
"");
70 const coral::IAuthenticationCredentials&
72 const std::string& role )
const
74 const coral::IAuthenticationCredentials* creds = m_cache.get( connectionString, role );
76 std::string credsStoreConn = m_db.setUpForConnectionString( connectionString, m_authenticationPath );
77 coral::MessageStream
log(
"cond::RelationalAuthenticationService::credentials");
79 m_db.selectForUser( m_cache );
81 creds = m_cache.get( connectionString, role );
83 std::string
msg(
"No Authentication available for connection=\"");
84 msg += connectionString +
"\".";
85 msg +=
" and role=\"" + role +
"\".";
86 throw coral::AuthenticationServiceException( msg,
"cond::RelationalAuthenticationService::RelationalAuthenticationService::credentials",
"");
coral::Property::CallbackID m_callbackID
static PFTauRenderPlugin instance
virtual ~RelationalAuthenticationService()
Standard Destructor.
static const std::string COND_AUTH_PATH_PROPERTY
#define DEFINE_CORALSERVICE(type, name)
void setAuthenticationPath(const std::string &inputPath)
Sets the input file name.
const coral::IAuthenticationCredentials & credentials(const std::string &connectionString) const
RelationalAuthenticationService(const std::string &name)
Standard Constructor.