28 #include <boost/program_options.hpp>
30 #include <drizzled/configmake.h>
31 #include <drizzled/plugin/authentication.h>
32 #include <drizzled/identifier.h>
33 #include <drizzled/util/convert.h>
36 namespace po= boost::program_options;
37 namespace fs= boost::filesystem;
40 using namespace drizzled;
45 static bool opt_allow_anonymous;
47 class AuthAll:
public plugin::Authentication
52 plugin::Authentication(
"auth_all")
63 if (not opt_allow_anonymous)
65 if (sctx.username().empty())
75 context.add(
new AuthAll());
82 context(
"allow-anonymous",
83 po::value<bool>(&opt_allow_anonymous)->default_value(
false),
84 N_(
"Allow anonymous access"));
90 DRIZZLE_DECLARE_PLUGIN
96 N_(
"Allows all users to authenticate regardless of username or password"),
100 auth_all::init_options
102 DRIZZLE_DECLARE_PLUGIN_END;