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 :
coral::
Service(
key), m_authenticationPath(
""), m_db(), m_cache(), m_callbackID(0) {
27 boost::function1<void, std::string> cb(boost::bind(
30 coral::Property* pm = dynamic_cast<coral::Property*>(
46 const coral::IAuthenticationCredentials&
49 const coral::IAuthenticationCredentials* creds = m_cache.get(
connectionString);
52 coral::MessageStream
log(
"cond::RelationalAuthenticationService::credentials");
53 log <<
coral::Debug <<
"Connecting to the credential repository in \"" << credsStoreConn <<
"\" with principal \""
54 << m_db.keyPrincipalName() <<
"\"." << coral::MessageStream::endmsg;
55 m_db.selectForUser(m_cache);
61 msg +=
" with role \"COND_DEFAULT_ROLE\" is not available for ";
62 msg += m_db.keyPrincipalName();
63 cond::throwException(
msg,
"cond::RelationalAuthenticationService::RelationalAuthenticationService::credentials");
68 const coral::IAuthenticationCredentials&
71 const coral::IAuthenticationCredentials* creds = m_cache.get(
connectionString, role);
74 coral::MessageStream
log(
"cond::RelationalAuthenticationService::credentials");
75 log <<
coral::Debug <<
"Connecting to the credential repository in \"" << credsStoreConn <<
"\" with principal \""
76 << m_db.keyPrincipalName() <<
"\"." << coral::MessageStream::endmsg;
77 m_db.selectForUser(m_cache);
83 msg +=
" with role \"" + role +
"\" is not available for ";
84 msg += m_db.keyPrincipalName();
85 cond::throwException(
msg,
"cond::RelationalAuthenticationService::RelationalAuthenticationService::credentials");
91 "COND/Services/RelationalAuthenticationService");