-/* Copyright 2002-2005 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* as the password.
*
* Just add the following tokes to your <directory> setup:
- *
+ *
* Anonymous magic-userid [magic-userid]...
*
* Anonymous_MustGiveEmail [ on | off ] default = on
* Anonymous_VerifyEmail [ on | off ] default = off
* Anonymous_NoUserId [ on | off ] default = off
*
- * The magic user id is something like 'anonymous', it is NOT case sensitive.
- *
+ * The magic user id is something like 'anonymous', it is NOT case sensitive.
+ *
* The MustGiveEmail flag can be used to force users to enter something
* in the password field (like an email address). Default is on.
*
* in broken GUIs like W95 is often given by the user. The Default is off.
*
* Dirk.vanGulik@jrc.it; http://ewse.ceo.org; http://me-www.jrc.it/~dirkx
- *
+ *
*/
#include "apr_strings.h"
static const command_rec authn_anon_cmds[] =
{
- AP_INIT_ITERATE("Anonymous", anon_set_string_slots, NULL, OR_AUTHCFG,
+ AP_INIT_ITERATE("Anonymous", anon_set_string_slots, NULL, OR_AUTHCFG,
"a space-separated list of user IDs"),
AP_INIT_FLAG("Anonymous_MustGiveEmail", ap_set_flag_slot,
(void *)APR_OFFSETOF(authn_anon_config_rec, mustemail),
authn_status res = AUTH_USER_NOT_FOUND;
/* Ignore if we are not configured */
- if (!conf->users) {
+ if (!conf->users && !conf->anyuserid) {
return AUTH_USER_NOT_FOUND;
}
static void register_hooks(apr_pool_t *p)
{
- ap_register_provider(p, AUTHN_PROVIDER_GROUP, "anon", "0",
- &authn_anon_provider);
+ ap_register_auth_provider(p, AUTHN_PROVIDER_GROUP, "anon",
+ AUTHN_PROVIDER_VERSION,
+ &authn_anon_provider, AP_AUTH_INTERNAL_PER_CONF);
}
-module AP_MODULE_DECLARE_DATA authn_anon_module =
+AP_DECLARE_MODULE(authn_anon) =
{
STANDARD20_MODULE_STUFF,
create_authn_anon_dir_config, /* dir config creater */