#include "apr_optional.h"
#include "httpd.h"
+#include "http_config.h"
#ifdef __cplusplus
extern "C" {
#define AUTHZ_PROVIDER_VERSION "0"
#define AUTHN_DEFAULT_PROVIDER "file"
-#define AUTHZ_GROUP_NOTE "authz_group_note"
#define AUTHN_PROVIDER_NAME_NOTE "authn_provider_name"
#define AUTHZ_PROVIDER_NAME_NOTE "authz_provider_name"
-#define AUTHZ_ACCESS_PASSED_NOTE "authz_access_passed"
#define AUTHN_PREFIX "AUTHENTICATE_"
typedef enum {
AUTHZ_DENIED,
AUTHZ_GRANTED,
- AUTHZ_GENERAL_ERROR,
AUTHZ_NEUTRAL,
+ AUTHZ_GENERAL_ERROR
} authz_status;
-typedef enum {
- AUTHZ_REQSTATE_ONE,
- AUTHZ_REQSTATE_ALL
-} authz_request_state;
-
typedef struct {
/* Given a username and password, expected to return AUTH_GRANTED
* if we can validate this user/password combination.
};
typedef struct {
- /* Given a request_rec, expected to return AUTH_GRANTED
+ /* Given a request_rec, expected to return AUTHZ_GRANTED
* if we can authorize user access.
*/
authz_status (*check_authorization)(request_rec *r,
const char *require_line);
} authz_provider;
-/* A linked-list of authn providers. */
-typedef struct authz_provider_list authz_provider_list;
-
-struct authz_provider_list {
- const char *provider_name;
- const authz_provider *provider;
- authz_provider_list *one_next;
- authz_provider_list *all_next;
- /** If a Limit method is in effect, this field will be set */
- apr_int64_t method_mask;
- authz_request_state req_state;
- int req_state_level;
- /** String following 'require <provider>' from config file */
- char *requirement;
- int is_reject;
-};
-
#ifdef __cplusplus
}
#endif