#include <XMLAuthenticationService.h>
Public Member Functions | |
void | appendCredentialItem (const std::string &item, const std::string &value) |
void | appendCredentialItemForRole (const std::string &item, const std::string &value, const std::string &role) |
const coral::IAuthenticationCredentials & | credentials () const |
const coral::IAuthenticationCredentials & | credentials (const std::string &role) const |
DataSourceEntry (const std::string &serviceName, const std::string &connectionName) | |
Constructor. More... | |
~DataSourceEntry () | |
Destructor. More... | |
Private Member Functions | |
DataSourceEntry ()=delete | |
DataSourceEntry (const DataSourceEntry &)=delete | |
DataSourceEntry & | operator= (const DataSourceEntry &)=delete |
Private Attributes | |
std::string | m_connectionName |
The connection name. More... | |
std::map< std::string, coral::AuthenticationCredentials * > | m_data |
The structure with the authentication data for the various roles. More... | |
coral::AuthenticationCredentials * | m_default |
The input file with the data. More... | |
std::string | m_serviceName |
The service name. More... | |
A simple class holding the roles and the credentials corresponding to a database service
Definition at line 27 of file XMLAuthenticationService.h.
cond::XMLAuthenticationService::DataSourceEntry::DataSourceEntry | ( | const std::string & | serviceName, |
const std::string & | connectionName | ||
) |
cond::XMLAuthenticationService::DataSourceEntry::~DataSourceEntry | ( | ) |
Destructor.
Definition at line 40 of file XMLAuthenticationService.cc.
|
privatedelete |
|
privatedelete |
void cond::XMLAuthenticationService::DataSourceEntry::appendCredentialItem | ( | const std::string & | item, |
const std::string & | value | ||
) |
Adds a credential item to the default role.
Definition at line 47 of file XMLAuthenticationService.cc.
References B2GTnPMonitor_cfi::item.
Referenced by cond::XMLAuthenticationService::XMLAuthenticationService::processFile().
void cond::XMLAuthenticationService::DataSourceEntry::appendCredentialItemForRole | ( | const std::string & | item, |
const std::string & | value, | ||
const std::string & | role | ||
) |
Adds a credential item to the default role.
Definition at line 52 of file XMLAuthenticationService.cc.
References B2GTnPMonitor_cfi::item.
Referenced by cond::XMLAuthenticationService::XMLAuthenticationService::processFile().
const coral::IAuthenticationCredentials & cond::XMLAuthenticationService::DataSourceEntry::credentials | ( | ) | const |
Returns a reference to the credentials object for the default role.
Definition at line 62 of file XMLAuthenticationService.cc.
const coral::IAuthenticationCredentials & cond::XMLAuthenticationService::DataSourceEntry::credentials | ( | const std::string & | role | ) | const |
Returns a reference to the credentials object for a given role. If the role is not known to the service an UnknownRoleException is thrown.
std::map< std::string, coral::AuthenticationCredentials* >::const_iterator iRole = m_data.find( role ); if ( iRole == m_data.end() ) throw coral::UnknownRoleException( m_serviceName, m_connectionName, role ); return *( iRole->second );
Definition at line 66 of file XMLAuthenticationService.cc.
|
privatedelete |
|
private |
The connection name.
Definition at line 61 of file XMLAuthenticationService.h.
|
private |
The structure with the authentication data for the various roles.
Definition at line 67 of file XMLAuthenticationService.h.
|
private |
The input file with the data.
Definition at line 64 of file XMLAuthenticationService.h.
|
private |
The service name.
Definition at line 58 of file XMLAuthenticationService.h.