forked from bmuller/mod_auth_openid
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmod_auth_openid.cpp
512 lines (448 loc) · 20.5 KB
/
mod_auth_openid.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
/*
Copyright (C) 2007-2010 Butterfat, LLC (http://butterfat.net)
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
Created by bmuller <[email protected]>
*/
#include "mod_auth_openid.h"
#define APDEBUG(r, msg, ...) ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, msg, __VA_ARGS__);
#define APWARN(r, msg, ...) ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r, msg, __VA_ARGS__);
#define APERR(r, msg, ...) ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, msg, __VA_ARGS__);
extern "C" module AP_MODULE_DECLARE_DATA authopenid_module;
typedef struct {
const char *db_location;
char *trust_root;
const char *cookie_name;
char *login_page;
bool use_cookie;
apr_array_header_t *trusted;
apr_array_header_t *distrusted;
int cookie_lifespan;
char *server_name;
char *auth_program;
char *cookie_path;
bool use_auth_program;
} modauthopenid_config;
typedef const char *(*CMD_HAND_TYPE) ();
static void *create_modauthopenid_config(apr_pool_t *p, char *s) {
modauthopenid_config *newcfg;
newcfg = (modauthopenid_config *) apr_pcalloc(p, sizeof(modauthopenid_config));
newcfg->db_location = "/tmp/mod_auth_openid.db";
newcfg->use_cookie = true;
newcfg->cookie_name = "open_id_session_id";
newcfg->cookie_path = NULL;
newcfg->trusted = apr_array_make(p, 5, sizeof(char *));
newcfg->distrusted = apr_array_make(p, 5, sizeof(char *));
newcfg->trust_root = NULL;
newcfg->cookie_lifespan = 0;
newcfg->server_name = NULL;
newcfg->auth_program = NULL;
newcfg->use_auth_program = false;
return (void *) newcfg;
}
static const char *set_modauthopenid_db_location(cmd_parms *parms, void *mconfig, const char *arg) {
modauthopenid_config *s_cfg = (modauthopenid_config *) mconfig;
s_cfg->db_location = (char *) arg;
return NULL;
}
static const char *set_modauthopenid_cookie_path(cmd_parms *parms, void *mconfig, const char *arg) {
modauthopenid_config *s_cfg = (modauthopenid_config *) mconfig;
s_cfg->cookie_path = (char *) arg;
return NULL;
}
static const char *set_modauthopenid_trust_root(cmd_parms *parms, void *mconfig, const char *arg) {
modauthopenid_config *s_cfg = (modauthopenid_config *) mconfig;
s_cfg->trust_root = (char *) arg;
return NULL;
}
static const char *set_modauthopenid_login_page(cmd_parms *parms, void *mconfig, const char *arg) {
modauthopenid_config *s_cfg = (modauthopenid_config *) mconfig;
s_cfg->login_page = (char *) arg;
return NULL;
}
static const char *set_modauthopenid_cookie_name(cmd_parms *parms, void *mconfig, const char *arg) {
modauthopenid_config *s_cfg = (modauthopenid_config *) mconfig;
s_cfg->cookie_name = (char *) arg;
return NULL;
}
static const char *set_modauthopenid_usecookie(cmd_parms *parms, void *mconfig, int flag) {
modauthopenid_config *s_cfg = (modauthopenid_config *) mconfig;
s_cfg->use_cookie = (bool) flag;
return NULL;
}
static const char *set_modauthopenid_cookie_lifespan(cmd_parms *parms, void *mconfig, const char *arg) {
modauthopenid_config *s_cfg = (modauthopenid_config *) mconfig;
s_cfg->cookie_lifespan = atoi(arg);
return NULL;
}
static const char *add_modauthopenid_trusted(cmd_parms *cmd, void *mconfig, const char *arg) {
modauthopenid_config *s_cfg = (modauthopenid_config *) mconfig;
*(const char **)apr_array_push(s_cfg->trusted) = arg;
return NULL;
}
static const char *add_modauthopenid_distrusted(cmd_parms *cmd, void *mconfig, const char *arg) {
modauthopenid_config *s_cfg = (modauthopenid_config *) mconfig;
*(const char **)apr_array_push(s_cfg->distrusted) = arg;
return NULL;
}
static const char *set_modauthopenid_server_name(cmd_parms *parms, void *mconfig, const char *arg) {
modauthopenid_config *s_cfg = (modauthopenid_config *) mconfig;
s_cfg->server_name = (char *) arg;
return NULL;
}
static const char *set_modauthopenid_auth_program(cmd_parms *parms, void *mconfig, const char *arg) {
modauthopenid_config *s_cfg = (modauthopenid_config *) mconfig;
s_cfg->auth_program = (char *) arg;
s_cfg->use_auth_program = true;
return NULL;
}
static const command_rec mod_authopenid_cmds[] = {
AP_INIT_TAKE1("AuthOpenIDCookieLifespan", (CMD_HAND_TYPE) set_modauthopenid_cookie_lifespan, NULL, OR_AUTHCFG,
"AuthOpenIDCookieLifespan <number seconds>"),
AP_INIT_TAKE1("AuthOpenIDDBLocation", (CMD_HAND_TYPE) set_modauthopenid_db_location, NULL, OR_AUTHCFG,
"AuthOpenIDDBLocation <string>"),
AP_INIT_TAKE1("AuthOpenIDLoginPage", (CMD_HAND_TYPE) set_modauthopenid_login_page, NULL, OR_AUTHCFG,
"AuthOpenIDLoginPage <url string>"),
AP_INIT_TAKE1("AuthOpenIDTrustRoot", (CMD_HAND_TYPE) set_modauthopenid_trust_root, NULL, OR_AUTHCFG,
"AuthOpenIDTrustRoot <trust root to use>"),
AP_INIT_TAKE1("AuthOpenIDCookieName", (CMD_HAND_TYPE) set_modauthopenid_cookie_name, NULL, OR_AUTHCFG,
"AuthOpenIDCookieName <name of cookie to use>"),
AP_INIT_TAKE1("AuthOpenIDCookiePath", (CMD_HAND_TYPE) set_modauthopenid_cookie_path, NULL, OR_AUTHCFG,
"AuthOpenIDCookiePath <path of cookie to use>"),
AP_INIT_FLAG("AuthOpenIDUseCookie", (CMD_HAND_TYPE) set_modauthopenid_usecookie, NULL, OR_AUTHCFG,
"AuthOpenIDUseCookie <On | Off> - use session auth?"),
AP_INIT_ITERATE("AuthOpenIDTrusted", (CMD_HAND_TYPE) add_modauthopenid_trusted, NULL, OR_AUTHCFG,
"AuthOpenIDTrusted <a list of trusted identity providers>"),
AP_INIT_ITERATE("AuthOpenIDDistrusted", (CMD_HAND_TYPE) add_modauthopenid_distrusted, NULL, OR_AUTHCFG,
"AuthOpenIDDistrusted <a blacklist list of identity providers>"),
AP_INIT_TAKE1("AuthOpenIDServerName", (CMD_HAND_TYPE) set_modauthopenid_server_name, NULL, OR_AUTHCFG,
"AuthOpenIDServerName <server name and port prefix>"),
AP_INIT_TAKE1("AuthOpenIDUserProgram", (CMD_HAND_TYPE) set_modauthopenid_auth_program, NULL, OR_AUTHCFG,
"AuthOpenIDUserProgram <full path to authentication program>"),
{NULL}
};
// Get the full URI of the request_rec's request location
// clean_params specifies whether or not all openid.* and modauthopenid.* params should be cleared
static void full_uri(request_rec *r, std::string& result, modauthopenid_config *s_cfg, bool clean_params=false) {
std::string hostname(r->hostname);
std::string uri(r->uri);
apr_port_t i_port = ap_get_server_port(r);
// Fetch the APR function for determining if we are looking at an https URL
APR_OPTIONAL_FN_TYPE(ssl_is_https) *using_https = APR_RETRIEVE_OPTIONAL_FN(ssl_is_https);
std::string prefix = (using_https != NULL && using_https(r->connection)) ? "https://" : "http://";
char *port = apr_psprintf(r->pool, "%lu", (unsigned long) i_port);
std::string s_port = (i_port == 80 || i_port == 443) ? "" : ":" + std::string(port);
std::string args;
if(clean_params) {
opkele::params_t params;
if(r->args != NULL) params = modauthopenid::parse_query_string(std::string(r->args));
modauthopenid::remove_openid_vars(params);
args = params.append_query("", "");
} else {
args = (r->args == NULL) ? "" : "?" + std::string(r->args);
}
if(s_cfg->server_name == NULL)
result = prefix + hostname + s_port + uri + args;
else
result = std::string(s_cfg->server_name) + uri + args;
}
static int show_input(request_rec *r, modauthopenid_config *s_cfg, modauthopenid::error_result_t e) {
if(s_cfg->login_page == NULL) {
std::string msg = modauthopenid::error_to_string(e, false);
return modauthopenid::show_html_input(r, msg);
}
opkele::params_t params;
if(r->args != NULL)
params = modauthopenid::parse_query_string(std::string(r->args));
modauthopenid::remove_openid_vars(params);
std::string uri_location;
full_uri(r, uri_location, s_cfg, true);
params["modauthopenid.referrer"] = uri_location;
params["modauthopenid.error"] = modauthopenid::error_to_string(e, true);
return modauthopenid::http_redirect(r, params.append_query(s_cfg->login_page, ""));
}
static int show_input(request_rec *r, modauthopenid_config *s_cfg) {
if(s_cfg->login_page == NULL)
return modauthopenid::show_html_input(r, "");
opkele::params_t params;
if(r->args != NULL)
params = modauthopenid::parse_query_string(std::string(r->args));
modauthopenid::remove_openid_vars(params);
std::string uri_location;
full_uri(r, uri_location, s_cfg, true);
params["modauthopenid.referrer"] = uri_location;
return modauthopenid::http_redirect(r, params.append_query(s_cfg->login_page, ""));
}
static bool is_trusted_provider(modauthopenid_config *s_cfg, std::string url, request_rec *r) {
if(apr_is_empty_array(s_cfg->trusted))
return true;
char **trusted_sites = (char **) s_cfg->trusted->elts;
std::string base_url = modauthopenid::get_queryless_url(url);
for (int i = 0; i < s_cfg->trusted->nelts; i++) {
pcre * re = modauthopenid::make_regex(trusted_sites[i]);
if(re == NULL) {
APERR(r, "regex compilation failed for regex: %s", trusted_sites[i]);
} else if(modauthopenid::regex_match(base_url, re)) {
modauthopenid::debug(base_url + " is a trusted identity provider");
return true;
}
}
APWARN(r, "%s is NOT a trusted identity provider", base_url.c_str());
return false;
}
static bool is_distrusted_provider(modauthopenid_config *s_cfg, std::string url, request_rec *r) {
if(apr_is_empty_array(s_cfg->distrusted))
return false;
char **distrusted_sites = (char **) s_cfg->distrusted->elts;
std::string base_url = modauthopenid::get_queryless_url(url);
for (int i = 0; i < s_cfg->distrusted->nelts; i++) {
pcre * re = modauthopenid::make_regex(distrusted_sites[i]);
if(re == NULL) {
APERR(r, "regex compilation failed for regex: %s", distrusted_sites[i]);
} else if(modauthopenid::regex_match(base_url, re)) {
APWARN(r, "%s is a distrusted (on black list) identity provider", base_url.c_str());
return true;
}
}
APDEBUG(r, "%s is NOT a distrusted identity provider (not blacklisted)", base_url.c_str());
return false;
};
static bool has_valid_session(request_rec *r, modauthopenid_config *s_cfg) {
// test for valid session - if so, return DECLINED
std::string session_id = "";
modauthopenid::get_session_id(r, std::string(s_cfg->cookie_name), session_id);
if(session_id != "" && s_cfg->use_cookie) {
modauthopenid::debug("found session_id in cookie: " + session_id);
modauthopenid::session_t session;
modauthopenid::SessionManager sm(std::string(s_cfg->db_location));
sm.get_session(session_id, session);
sm.close();
// if session found
if(std::string(session.identity) != "") {
std::string uri_path;
modauthopenid::base_dir(std::string(r->uri), uri_path);
std::string valid_path(session.path);
// if found session has a valid path
if(valid_path == uri_path.substr(0, valid_path.size()) && apr_strnatcmp(session.hostname.c_str(), r->hostname)==0) {
const char* idchar = std::string(session.identity).c_str();
APDEBUG(r, "setting REMOTE_USER to \"%s\"", idchar);
r->user = apr_pstrdup(r->pool, idchar);
return true;
} else {
APDEBUG(r, "session found for different path or hostname (cooke was for %s)", session.hostname.c_str());
}
}
}
return false;
};
static int start_authentication_session(request_rec *r, modauthopenid_config *s_cfg, opkele::params_t& params,
std::string& return_to, std::string& trust_root) {
// remove all openid GET query params (openid.*) - we don't want that maintained through
// the redirection process. We do, however, want to keep all aother GET params.
// also, add a nonce for security
std::string identity = params.get_param("openid_identifier");
// pull out the extension parameters before we get rid of openid.*
opkele::params_t ext_params;
modauthopenid::get_extension_params(ext_params, params);
modauthopenid::remove_openid_vars(params);
// add a nonce and reset what return_to is
std::string nonce, re_direct;
modauthopenid::make_rstring(10, nonce);
modauthopenid::MoidConsumer consumer(std::string(s_cfg->db_location), nonce, return_to);
params["modauthopenid.nonce"] = nonce;
full_uri(r, return_to, s_cfg, true);
return_to = params.append_query(return_to, "");
// get identity provider and redirect
try {
consumer.initiate(identity);
opkele::openid_message_t cm;
re_direct = consumer.checkid_(cm, opkele::mode_checkid_setup, return_to, trust_root).append_query(consumer.get_endpoint().uri);
re_direct = ext_params.append_query(re_direct, "");
} catch (opkele::failed_xri_resolution &e) {
consumer.close();
return show_input(r, s_cfg, modauthopenid::invalid_id);
} catch (opkele::failed_discovery &e) {
consumer.close();
return show_input(r, s_cfg, modauthopenid::invalid_id);
} catch (opkele::bad_input &e) {
consumer.close();
return show_input(r, s_cfg, modauthopenid::invalid_id);
} catch (opkele::exception &e) {
consumer.close();
APERR(r, "Error while fetching idP location: %s", e.what());
return show_input(r, s_cfg, modauthopenid::no_idp_found);
}
consumer.close();
if(!is_trusted_provider(s_cfg , re_direct, r) || is_distrusted_provider(s_cfg, re_direct, r))
return show_input(r, s_cfg, modauthopenid::idp_not_trusted);
return modauthopenid::http_redirect(r, re_direct);
};
static int set_session_cookie(request_rec *r, modauthopenid_config *s_cfg, opkele::params_t& params, std::string identity) {
// now set auth cookie, if we're doing session based auth
std::string session_id, hostname, path, cookie_value, redirect_location, args;
if(s_cfg->cookie_path != NULL)
path = std::string(s_cfg->cookie_path);
else
modauthopenid::base_dir(std::string(r->uri), path);
modauthopenid::make_rstring(32, session_id);
modauthopenid::make_cookie_value(cookie_value, std::string(s_cfg->cookie_name), session_id, path, s_cfg->cookie_lifespan);
APDEBUG(r, "Setting cookie after authentication of user %s", identity.c_str());
apr_table_set(r->err_headers_out, "Set-Cookie", cookie_value.c_str());
hostname = std::string(r->hostname);
// save session values
modauthopenid::SessionManager sm(std::string(s_cfg->db_location));
sm.store_session(session_id, hostname, path, identity, s_cfg->cookie_lifespan);
sm.close();
opkele::params_t ext_params;
modauthopenid::get_extension_params(ext_params, params);
modauthopenid::remove_openid_vars(params);
modauthopenid::merge_params(ext_params, params);
args = params.append_query("", "").substr(1);
if(args.length() == 0)
r->args = NULL;
else
apr_cpystrn(r->args, args.c_str(), 1024);
full_uri(r, redirect_location, s_cfg);
return modauthopenid::http_redirect(r, redirect_location);
};
static int validate_authentication_session(request_rec *r, modauthopenid_config *s_cfg, opkele::params_t& params, std::string& return_to) {
// make sure nonce is present
if(!params.has_param("modauthopenid.nonce"))
return show_input(r, s_cfg, modauthopenid::invalid_nonce);
modauthopenid::MoidConsumer consumer(std::string(s_cfg->db_location), params.get_param("modauthopenid.nonce"), return_to);
try {
consumer.id_res(modauthopenid::modauthopenid_message_t(params));
// if no exception raised, check nonce
if(!consumer.session_exists()) {
consumer.close();
return show_input(r, s_cfg, modauthopenid::invalid_nonce);
}
// if we should be using a user specified auth program, run it to see if user is authorized
if(s_cfg->use_auth_program) {
std::string username = consumer.get_claimed_id();
std::string progname = std::string(s_cfg->auth_program);
modauthopenid::exec_result_t eresult = modauthopenid::exec_auth(progname, username);
if(eresult != modauthopenid::id_accepted) {
std::string error = modauthopenid::exec_error_to_string(eresult, progname, username);
APERR(r, "Error in authentication: %s", error.c_str());
consumer.close();
return show_input(r, s_cfg, modauthopenid::unauthorized);
} else {
APDEBUG(r, "Authenticated %s using %s", username.c_str(), progname.c_str());
}
}
// Make sure that identity is set to the original one given by the user (in case of delegation
// this will be different than openid_identifier GET param
std::string identity = consumer.get_claimed_id();
consumer.kill_session();
consumer.close();
if(s_cfg->use_cookie)
return set_session_cookie(r, s_cfg, params, identity);
// if we're not setting cookie - don't redirect, just show page
APERR(r, "Setting REMOTE_USER to %s", identity.c_str());
r->user = apr_pstrdup(r->pool, identity.c_str());
return DECLINED;
} catch(opkele::exception &e) {
APERR(r, "Error in authentication: %s", e.what());
consumer.close();
return show_input(r, s_cfg, modauthopenid::unspecified);
}
};
static int mod_authopenid_method_handler(request_rec *r) {
modauthopenid_config *s_cfg;
s_cfg = (modauthopenid_config *) ap_get_module_config(r->per_dir_config, &authopenid_module);
// if we're not enabled for this location/dir, decline doing anything
const char *current_auth = ap_auth_type(r);
if (!current_auth || strcasecmp(current_auth, "openid"))
return DECLINED;
// make a record of our being called
APDEBUG(r, "*** %s module has been called ***", PACKAGE_STRING);
// if user has a valid session, they are authorized (OK)
if(has_valid_session(r, s_cfg))
return OK;
// parse the get/post params
opkele::params_t params;
modauthopenid::get_request_params(r, params);
// get our current url and trust root
std::string return_to, trust_root;
full_uri(r, return_to, s_cfg);
if(s_cfg->trust_root == NULL)
modauthopenid::base_dir(return_to, trust_root);
else
trust_root = std::string(s_cfg->trust_root);
// if user is posting id (only openid_identifier will contain a value)
if(params.has_param("openid_identifier") && !params.has_param("openid.assoc_handle")) {
return start_authentication_session(r, s_cfg, params, return_to, trust_root);
} else if(params.has_param("openid.assoc_handle")) { // user has been redirected, authenticate them and set cookie
return validate_authentication_session(r, s_cfg, params, return_to);
} else { //display an input form
if(params.has_param("openid.mode") && params.get_param("openid.mode") == "cancel")
return show_input(r, s_cfg, modauthopenid::canceled);
return show_input(r, s_cfg);
}
}
static int mod_authopenid_check_user_access(request_rec *r) {
modauthopenid_config *s_cfg;
s_cfg = (modauthopenid_config *) ap_get_module_config(r->per_dir_config, &authopenid_module);
char *user = r->user;
int m = r->method_number;
int required_user = 0;
register int x;
const char *t, *w;
const apr_array_header_t *reqs_arr = ap_requires(r);
require_line *reqs;
if (!reqs_arr)
return DECLINED;
reqs = (require_line *)reqs_arr->elts;
for (x = 0; x < reqs_arr->nelts; x++) {
if (!(reqs[x].method_mask & (AP_METHOD_BIT << m)))
continue;
t = reqs[x].requirement;
w = ap_getword_white(r->pool, &t);
if (!strcasecmp(w, "valid-user"))
return OK;
if (!strcasecmp(w, "user")) {
required_user = 1;
while (t[0]) {
w = ap_getword_conf(r->pool, &t);
if (!strcmp(user, w))
return OK;
}
}
}
if (!required_user)
return DECLINED;
APERR(r, "Access to %s failed: user '%s' invalid", r->uri, user);
ap_note_auth_failure(r);
return HTTP_UNAUTHORIZED;
}
static void mod_authopenid_register_hooks (apr_pool_t *p) {
ap_hook_check_user_id(mod_authopenid_method_handler, NULL, NULL, APR_HOOK_MIDDLE);
ap_hook_auth_checker(mod_authopenid_check_user_access, NULL, NULL, APR_HOOK_MIDDLE);
}
//module AP_MODULE_DECLARE_DATA
module AP_MODULE_DECLARE_DATA authopenid_module = {
STANDARD20_MODULE_STUFF,
create_modauthopenid_config,
NULL, // config merge function - default is to override
NULL,
NULL,
mod_authopenid_cmds,
mod_authopenid_register_hooks,
};