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"
19 #include "CoralBase/MessageStream.h"
23 :
coral::
Service(
key), m_authenticationPath(
""), m_db(), m_cache(), m_callbackID(0) {
24 boost::function1<void, std::string> cb(
27 std::placeholders::_1));
29 coral::Property* pm = dynamic_cast<coral::Property*>(
45 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&
72 const coral::IAuthenticationCredentials* creds = m_cache.get(
connectionString, role);
75 coral::MessageStream
log(
"cond::RelationalAuthenticationService::credentials");
76 log <<
coral::Debug <<
"Connecting to the credential repository in \"" << credsStoreConn <<
"\" with principal \""
77 << m_db.keyPrincipalName() <<
"\"." << coral::MessageStream::endmsg;
78 m_db.selectForUser(m_cache);
84 msg +=
" with role \"" + role +
"\" is not available for ";
85 msg += m_db.keyPrincipalName();
86 cond::throwException(
msg,
"cond::RelationalAuthenticationService::RelationalAuthenticationService::credentials");
92 return m_db.keyPrincipalName();
96 "COND/Services/RelationalAuthenticationService");