21 #include <drizzled/item.h>
22 #include <drizzled/plugin.h>
24 #include <boost/program_options.hpp>
25 #include "auth_schema.h"
27 namespace po= boost::program_options;
31 namespace drizzle_plugin {
32 namespace auth_schema {
37 static AuthSchema *auth_schema= NULL;
43 errmsg_printf(error::ERROR, _(
"auth_schema table cannot be NULL"));
49 auth_schema=
new AuthSchema(
true);
52 po::value<string>(&auth_schema->sysvar_table)->default_value(
"auth.users"),
53 N_(
"Database-qualified auth table name"));
60 if (not vm[
"table"].as<string>().empty())
61 auth_schema->
setTable(vm[
"table"].as<string>());
63 context.add(auth_schema);
65 context.registerVariable(
new sys_var_std_string(
"table", auth_schema->sysvar_table, NULL, &update_table));
73 DRIZZLE_DECLARE_PLUGIN
79 N_(
"Authentication against a table with encrypted passwords"),
81 drizzle_plugin::auth_schema::init,
83 drizzle_plugin::auth_schema::init_options,
85 DRIZZLE_DECLARE_PLUGIN_END;