You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
proxysql/include/MySQL_Authentication.hpp

28 lines
1.4 KiB

#ifndef __CLASS_MYSQL_AUTHENTICATION_H
#define __CLASS_MYSQL_AUTHENTICATION_H
#include "proxysql.h"
#include "cpp.h"
enum cred_username_type { USERNAME_BACKEND, USERNAME_FRONTEND };
class MySQL_Authentication {
public:
MySQL_Authentication() {};
virtual ~MySQL_Authentication() {};
//virtual bool add(char *username, char *password, enum cred_username_type usertype, bool use_ssl) { return false; };
virtual bool add(char *username, char *password, enum cred_username_type usertype, bool use_ssl, int default_hostgroup, char *default_schema, bool schema_locked, bool transaction_persistent, bool fast_forward) { return false; };
virtual bool del(char *username, enum cred_username_type usertype) { return false; };
// virtual bool reset(unsigned char *) { return false; };
virtual bool reset() { return false; };
// virtual bool refresh() { return false; };
virtual void print_version() {};
// virtual char * lookup(char *username, enum cred_username_type usertype, bool *use_ssl) {return NULL; };
virtual char * lookup(char *username, enum cred_username_type usertype, bool *use_ssl, int *default_hostgroup, char **default_schema, bool *schema_locked, bool *transaction_persistent, bool *fast_forward) {return NULL; };
};
typedef MySQL_Authentication * create_MySQL_Authentication_t();
typedef void destroy_MyAuth_t(MySQL_Authentication *);
#endif /* __CLASS_MYSQL_AUTHENTICATION_H */