summaryrefslogtreecommitdiff
path: root/daemon/httpauthd.h
diff options
context:
space:
mode:
authorStef Walter <stef@memberwebs.com>2004-05-07 22:02:29 +0000
committerStef Walter <stef@memberwebs.com>2004-05-07 22:02:29 +0000
commit80b0e2c0fdad108454ae87130496f595f0b81b81 (patch)
tree696ce7e9010f412ce4e988e4d88553b19e2e42a8 /daemon/httpauthd.h
parent0bc8575dbfb281f5f5e9fb530247d29ba1f296fc (diff)
- Reworked the internal API
- Added common functions for trimming - Debugging - Reworked the module to the new protocol
Diffstat (limited to 'daemon/httpauthd.h')
-rw-r--r--daemon/httpauthd.h48
1 files changed, 20 insertions, 28 deletions
diff --git a/daemon/httpauthd.h b/daemon/httpauthd.h
index ce5b21b..84a30cd 100644
--- a/daemon/httpauthd.h
+++ b/daemon/httpauthd.h
@@ -131,8 +131,7 @@ typedef int (*auth_config_t)(struct ha_context* ctx, const char* name, const cha
* for this handler. Note that all data access in this
* function must be thread-safe.
*/
-typedef int (*auth_process_t)(struct ha_context* ctx, const struct ha_request* req,
- struct ha_response* resp, ha_buffer_t* mem);
+typedef int (*auth_process_t)(const struct ha_request* req, struct ha_response* resp);
/* An authentication handler */
typedef struct ha_handler
@@ -175,12 +174,15 @@ ha_handler_t;
#define HA_BADREQ -3
-
-/* Standard options for the current context */
-typedef struct ha_context_opts
+/* Context passed to the handler functions above */
+typedef struct ha_context
{
- /* Basic options */
- unsigned int types;
+ const char* name; /* A name assigned by the configuration file */
+ const ha_handler_t* handler; /* The original handler structure */
+ void* ctx_data; /* Handler specific data */
+
+ /* Context specific options */
+ unsigned int allowed_types;
int cache_timeout;
int cache_max;
@@ -192,16 +194,6 @@ typedef struct ha_context_opts
unsigned int digest_ignorenc : 1;
const char* digest_debugnonce;
}
-ha_context_opts_t;
-
-/* Context passed to the handler functions above */
-typedef struct ha_context
-{
- const char* name; /* A name assigned by the configuration file */
- const ha_handler_t* handler; /* The original handler structure */
- const ha_context_opts_t* opts; /* The options */
- void* data; /* Handler specific data */
-}
ha_context_t;
@@ -247,16 +239,9 @@ ha_header_t;
#define REQTYPE_AUTH 2
#define REQTYPE_SET 3
-#define AUTH_ARG_CONN 1
-#define AUTH_ARG_METHOD 2
-#define AUTH_ARG_URI 3
-
-/* Options for the current request */
-typedef struct ha_request_opts
-{
- const char* digest_domains;
-}
-ha_request_opts_t;
+#define AUTH_ARG_CONN 0
+#define AUTH_ARG_METHOD 1
+#define AUTH_ARG_URI 2
/* A single request from client */
typedef struct ha_request
@@ -264,7 +249,13 @@ typedef struct ha_request
int type;
const char* args[HA_MAX_ARGS];
ha_header_t headers[HA_MAX_HEADERS];
- const ha_request_opts_t* opts;
+
+ /* Additional request info */
+ ha_context_t* context;
+ const char* digest_domain;
+
+ /* The buffer in use */
+ ha_buffer_t* buf;
}
ha_request_t;
@@ -282,6 +273,7 @@ typedef struct ha_response
int code;
const char* detail;
ha_header_t headers[HA_MAX_HEADERS];
+ ha_buffer_t* buf;
}
ha_response_t;