24#ifndef RPL_CHANNEL_CREDENTIALS_INCLUDE
25#define RPL_CHANNEL_CREDENTIALS_INCLUDE
39 char *plugin_auth_arg) {
40 if ((
username.first = (username_arg !=
nullptr)))
41 username.second.assign(username_arg);
42 if ((
password.first = (password_arg !=
nullptr)))
43 password.second.assign(password_arg);
44 if ((
plugin_auth.first = (plugin_auth_arg !=
nullptr)))
Definition: rpl_channel_credentials.h:32
int get_credentials(const char *channel_name, String_set &user, String_set &pass, String_set &auth)
Method to get channel credentials.
Definition: rpl_channel_credentials.cc:44
virtual ~Rpl_channel_credentials()=default
Destructor.
std::pair< std::string, Channel_cred_param > channel_credential_pair
Definition: rpl_channel_credentials.h:50
int store_credentials(const char *channel_name, char *username, char *password, char *plugin_auth)
Method to store credentials in map.
Definition: rpl_channel_credentials.cc:63
Rpl_channel_credentials()=default
Constructor.
std::map< std::string, Channel_cred_param > m_credential_set
Definition: rpl_channel_credentials.h:51
int number_of_channels()
Number of channels stored.
Definition: rpl_channel_credentials.cc:39
int delete_credentials(const char *channel_name)
Method to delete channel credentials.
Definition: rpl_channel_credentials.cc:77
static Rpl_channel_credentials & get_instance()
Returns object.
Definition: rpl_channel_credentials.cc:33
void reset()
Delete all stored credentials and delete instance.
Definition: rpl_channel_credentials.cc:28
static char * password
Definition: mysql_secure_installation.cc:56
char * user
Definition: mysqladmin.cc:60
constexpr value_type plugin_auth
Definition: classic_protocol_constants.h:57
std::pair< bool, std::string > String_set
Definition: rpl_channel_credentials.h:30
Definition: rpl_channel_credentials.h:33
String_set plugin_auth
Definition: rpl_channel_credentials.h:36
String_set password
Definition: rpl_channel_credentials.h:35
Channel_cred_param(char *username_arg, char *password_arg, char *plugin_auth_arg)
Definition: rpl_channel_credentials.h:38
String_set username
Definition: rpl_channel_credentials.h:34