summaryrefslogtreecommitdiff
path: root/daemon/httpauthd.h
diff options
context:
space:
mode:
authorStef Walter <stef@memberwebs.com>2004-04-28 20:59:48 +0000
committerStef Walter <stef@memberwebs.com>2004-04-28 20:59:48 +0000
commitdbbf162dc9be0aef47f2d1f1fcddb7ae4e074d47 (patch)
treec06b131bc9f249557d9891d07977c4f0f3d0f15b /daemon/httpauthd.h
parent8368de7830f336533f9fe6369641070239bf739c (diff)
Tons of fixes, debugging, changes, added apache module
Diffstat (limited to 'daemon/httpauthd.h')
-rw-r--r--daemon/httpauthd.h35
1 files changed, 24 insertions, 11 deletions
diff --git a/daemon/httpauthd.h b/daemon/httpauthd.h
index 95187be..cd1d39e 100644
--- a/daemon/httpauthd.h
+++ b/daemon/httpauthd.h
@@ -177,16 +177,29 @@ ha_handler_t;
-struct ha_options;
+typedef struct ha_options
+{
+ /* Basic options */
+ unsigned int types;
+ int cache_timeout;
+ int cache_max;
+
+ /* For basic and digest auth: */
+ const char* realm;
+
+ /* For digest auth: */
+ int digest_ignoreuri;
+ const char* digest_domains;
+ const char* digest_debugnonce;
+}
+ha_options_t;
/* Context passed to the handler functions below */
typedef struct ha_context
{
const char* name; /* A name assigned by the configuration file */
ha_handler_t* handler; /* The original handler structure */
- unsigned int types; /* The types of authentication allowed */
- int cache_timeout; /* Timeout for cached connections */
- int cache_max; /* Maximum amount of cached connections */
+ ha_options_t opts; /* The options */
void* data; /* Handler specific data */
}
ha_context_t;
@@ -202,7 +215,7 @@ ha_context_t;
* should be no need to change it unless we're
* adding or removing commands
*/
-#define MAX_ARGS 4
+#define HA_MAX_ARGS 4
/*
* The maximum number of pertinent headers to read
@@ -211,13 +224,13 @@ ha_context_t;
* of valid headers in httpauthd.c
*/
-#define MAX_HEADERS 2
+#define HA_MAX_HEADERS 2
/*
* The maximum number of handlers. If you add
* handlers make sure to update this number.
*/
-#define MAX_HANDLERS 4
+#define HA_MAX_HANDLERS 4
/* A single header in memory */
@@ -241,8 +254,8 @@ ha_header_t;
typedef struct ha_request
{
int type;
- const char* args[MAX_ARGS];
- ha_header_t headers[MAX_HEADERS];
+ const char* args[HA_MAX_ARGS];
+ ha_header_t headers[HA_MAX_HEADERS];
}
ha_request_t;
@@ -250,7 +263,7 @@ ha_request_t;
#define HA_SERVER_READY 100
#define HA_SERVER_ACCEPT 200
#define HA_SERVER_DECLINE 401
-#define HA_SERVER_BADREQ 402
+#define HA_SERVER_BADREQ 400
#define HA_SERVER_BUSY 500
/* A response to the client */
@@ -258,7 +271,7 @@ typedef struct ha_response
{
int code;
const char* detail;
- ha_header_t headers[MAX_HEADERS];
+ ha_header_t headers[HA_MAX_HEADERS];
}
ha_response_t;