~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/auth_http/auth_http.cc

  • Committer: Brian Aker
  • Date: 2010-03-17 19:18:40 UTC
  • mto: This revision was merged to the branch mainline in revision 1354.
  • Revision ID: brian@gaz-20100317191840-9ro7fajqp6lhaqjo
Update, we now have all of the ANSI INFORMATION_SCHEMA listed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
70
70
  ~Auth_http()
71
71
  {
72
72
    curl_easy_cleanup(curl_handle);
73
 
    curl_global_cleanup();
74
73
  }
75
74
 
76
75
  virtual bool authenticate(const SecurityContext &sctx, const string &password)
120
119
 
121
120
Auth_http* auth= NULL;
122
121
 
123
 
static int initialize(drizzled::plugin::Context &context)
 
122
static int initialize(drizzled::plugin::Registry &registry)
124
123
{
125
124
  /* 
126
125
   * Per libcurl manual, in multi-threaded applications, curl_global_init() should
131
130
    return 1;
132
131
 
133
132
  auth= new Auth_http("auth_http");
134
 
  context.add(auth);
 
133
  registry.add(auth);
 
134
 
 
135
  return 0;
 
136
}
 
137
 
 
138
static int finalize(drizzled::plugin::Registry &registry)
 
139
{
 
140
  if (auth)
 
141
  {
 
142
    registry.remove(auth);
 
143
    delete auth;
 
144
 
 
145
    curl_global_cleanup();
 
146
  }
135
147
 
136
148
  return 0;
137
149
}
171
183
  "HTTP based authenication.",
172
184
  PLUGIN_LICENSE_GPL,
173
185
  initialize, /* Plugin Init */
 
186
  finalize, /* Plugin Deinit */
174
187
  auth_http_system_variables,
175
188
  NULL    /* config options */
176
189
}