2005-02-20 14:27:00 +00:00
|
|
|
#ifndef _HTTP_AUTH_H_
|
|
|
|
#define _HTTP_AUTH_H_
|
2016-03-19 15:14:35 +00:00
|
|
|
#include "first.h"
|
2005-02-20 14:27:00 +00:00
|
|
|
|
2016-08-18 17:54:53 +00:00
|
|
|
#include "base.h"
|
2005-02-20 14:27:00 +00:00
|
|
|
|
2016-08-18 17:54:53 +00:00
|
|
|
typedef struct http_auth_backend_t {
|
|
|
|
const char *name;
|
|
|
|
handler_t(*basic)(server *srv, connection *con, void *p_d, const buffer *username, const buffer *realm, const char *pw);
|
|
|
|
handler_t(*digest)(server *srv, connection *con, void *p_d, const char *username, const char *realm, unsigned char HA1[16]);
|
|
|
|
void *p_d;
|
|
|
|
} http_auth_backend_t;
|
2006-10-04 13:26:23 +00:00
|
|
|
|
2016-08-18 17:54:53 +00:00
|
|
|
const http_auth_backend_t * http_auth_backend_get (const buffer *name);
|
|
|
|
void http_auth_backend_set (const http_auth_backend_t *backend);
|
2005-02-20 14:27:00 +00:00
|
|
|
|
2016-09-10 02:28:01 +00:00
|
|
|
int http_auth_md5_hex2bin (const char *md5hex, size_t len, unsigned char md5bin[16]);
|
|
|
|
|
2005-02-20 14:27:00 +00:00
|
|
|
#endif
|