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>
36namespace po= boost::program_options;
37namespace fs= boost::filesystem;
45static bool opt_allow_anonymous;
47class 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());
80static void init_options(drizzled::module::option_context &context)
82 context(
"allow-anonymous",
83 po::value<bool>(&opt_allow_anonymous)->default_value(
false),
84 N_(
"Allow anonymous access"));
96 N_(
"Allows all users to authenticate regardless of username or password"),
100 auth_all::init_options
102DRIZZLE_DECLARE_PLUGIN_END;
bool authenticate(const identifier::User &sctx, const string &)
A set of Session members describing the current authenticated user.
TODO: Rename this file - func.h is stupid.
An Proxy Wrapper around boost::program_options::variables_map.