~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/auth_http/auth_http.cc

Merge of VJ

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
 
24
24
#include <string>
25
25
#include <cassert>
26
 
 
 
26
#include <boost/program_options.hpp>
 
27
#include <drizzled/module/option_map.h>
27
28
#include "drizzled/security_context.h"
28
29
#include "drizzled/plugin/authentication.h"
29
30
#include "drizzled/gettext.h"
30
 
 
 
31
namespace po= boost::program_options;
31
32
using namespace drizzled;
32
33
using namespace std;
33
34
 
34
 
static bool sysvar_auth_http_enable= false;
 
35
static bool sysvar_auth_http_enable;
35
36
static char* sysvar_auth_http_url= NULL;
36
37
 
37
38
static size_t curl_cb_read(void *ptr, size_t size, size_t nmemb, void *stream)
136
137
  return 0;
137
138
}
138
139
 
 
140
static void init_options(drizzled::module::option_context &context)
 
141
{
 
142
   context("enable", po::value<bool>(&sysvar_auth_http_enable)->default_value(false)->zero_tokens(),
 
143
           N_("Enable HTTP Auth check"));
 
144
 
145
 
139
146
static DRIZZLE_SYSVAR_BOOL(
140
147
  enable,
141
148
  sysvar_auth_http_enable,
165
172
DRIZZLE_DECLARE_PLUGIN
166
173
{
167
174
  DRIZZLE_VERSION_ID,
168
 
  "auth_http",
 
175
  "auth-http",
169
176
  "0.1",
170
177
  "Mark Atwood",
171
178
  "HTTP based authenication.",
172
179
  PLUGIN_LICENSE_GPL,
173
180
  initialize, /* Plugin Init */
174
181
  auth_http_system_variables,
175
 
  NULL    /* config options */
 
182
  init_options    /* config options */
176
183
}
177
184
DRIZZLE_DECLARE_PLUGIN_END;