File indexing completed on 2024-04-06 12:01:25
0001 #ifndef COND_XMLAUTHENTITACTIONSERVICE_H
0002 #define COND_XMLAUTHENTITACTIONSERVICE_H
0003
0004 #include "CondCore/CondDB/interface/CredentialStore.h"
0005 #include "CondCore/CondDB/src/IDbAuthentication.h"
0006
0007 #include "RelationalAccess/IAuthenticationService.h"
0008 #include "CoralKernel/Service.h"
0009 #include "CoralKernel/Property.h"
0010
0011 #include <map>
0012 #include <set>
0013 #include <string>
0014
0015 namespace coral {
0016
0017 class AuthenticationCredentials;
0018
0019 }
0020
0021 namespace cond {
0022
0023 namespace RelationalAuthenticationService {
0024
0025
0026
0027 class RelationalAuthenticationService : public coral::Service,
0028 virtual public coral::IAuthenticationService,
0029 virtual public persistency::IDbAuthentication {
0030 public:
0031
0032 explicit RelationalAuthenticationService(const std::string& name);
0033
0034
0035 ~RelationalAuthenticationService() override;
0036
0037 public:
0038
0039 void setAuthenticationPath(const std::string& inputPath);
0040
0041
0042
0043
0044
0045 const coral::IAuthenticationCredentials& credentials(const std::string& connectionString) const override;
0046
0047
0048
0049
0050
0051
0052 const coral::IAuthenticationCredentials& credentials(const std::string& connectionString,
0053 const std::string& role) const override;
0054
0055 std::string principalName() override;
0056
0057 private:
0058
0059 std::string m_authenticationPath;
0060
0061
0062 mutable CredentialStore m_db;
0063
0064 mutable coral_bridge::AuthenticationCredentialSet m_cache;
0065
0066 coral::Property::CallbackID m_callbackID;
0067 };
0068
0069 }
0070
0071 }
0072
0073 #endif