00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00025 #ifndef APACHE_MOD_AUTH_H
00026 #define APACHE_MOD_AUTH_H
00027
00028 #include "apr_pools.h"
00029 #include "apr_hash.h"
00030
00031 #include "httpd.h"
00032
00033 #ifdef __cplusplus
00034 extern "C" {
00035 #endif
00036
00037 #define AUTHN_PROVIDER_GROUP "authn"
00038 #define AUTHN_DEFAULT_PROVIDER "file"
00039
00040 #define AUTHZ_GROUP_NOTE "authz_group_note"
00041 #define AUTHN_PROVIDER_NAME_NOTE "authn_provider_name"
00042
00043 typedef enum {
00044 AUTH_DENIED,
00045 AUTH_GRANTED,
00046 AUTH_USER_FOUND,
00047 AUTH_USER_NOT_FOUND,
00048 AUTH_GENERAL_ERROR
00049 } authn_status;
00050
00051 typedef struct {
00052
00053
00054
00055 authn_status (*check_password)(request_rec *r, const char *user,
00056 const char *password);
00057
00058
00059
00060
00061 authn_status (*get_realm_hash)(request_rec *r, const char *user,
00062 const char *realm, char **rethash);
00063 } authn_provider;
00064
00065
00066 typedef struct authn_provider_list authn_provider_list;
00067
00068 struct authn_provider_list {
00069 const char *provider_name;
00070 const authn_provider *provider;
00071 authn_provider_list *next;
00072 };
00073
00074 typedef struct {
00075
00076 apr_hash_t * (*get_user_groups)(request_rec *r, const char *user);
00077 } authz_provider;
00078
00079 #ifdef __cplusplus
00080 }
00081 #endif
00082
00083 #endif