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(
""),
51 const coral::IAuthenticationCredentials&
54 const coral::IAuthenticationCredentials* creds =
m_cache.
get( connectionString );
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;
64 msg += connectionString +
"\"";
65 msg +=
" with role \"COND_DEFAULT_ROLE\" is not available for ";
67 cond::throwException( msg,
"cond::RelationalAuthenticationService::RelationalAuthenticationService::credentials" );
72 const coral::IAuthenticationCredentials&
76 const coral::IAuthenticationCredentials* creds =
m_cache.
get( connectionString, role );
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;
86 msg += connectionString +
"\"";
87 msg +=
" with role \"" + role +
"\" is not available for ";
89 cond::throwException( msg,
"cond::RelationalAuthenticationService::RelationalAuthenticationService::credentials" );
const std::string & keyPrincipalName()
coral::Property::CallbackID m_callbackID
static PFTauRenderPlugin instance
coral_bridge::AuthenticationCredentialSet m_cache
std::string m_authenticationPath
The input file with the data.
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.
std::string setUpForConnectionString(const std::string &connectionString, const std::string &authPath)
bool selectForUser(coral_bridge::AuthenticationCredentialSet &destinationData)
~RelationalAuthenticationService() override
Standard Destructor.
const coral::IAuthenticationCredentials * get(const std::string &connectionString) const
CredentialStore m_db
The service providing the authentication data.
const coral::IAuthenticationCredentials & credentials(const std::string &connectionString) const override
RelationalAuthenticationService(const std::string &name)
Standard Constructor.