Files
mongoose/docs/c-api/http.h/mg_http_is_authorized.md
T
Dmitry Frank ddd35c0cba Fail if authn file is configured but doesn't exist
PUBLISHED_FROM=2c176091ffb6c7c5cfe8ea4f05b6109e00b33383
2017-11-28 19:35:22 +00:00

657 B

title, decl_name, symbol_kind, signature
title decl_name symbol_kind signature
mg_http_is_authorized() mg_http_is_authorized func int mg_http_is_authorized(struct http_message *hm, struct mg_str path, const char *domain, const char *passwords_file, int flags);

Checks whether an http request is authorized. domain is the authentication realm, passwords_file is a htdigest file (can be created e.g. with htdigest utility). If either domain or passwords_file is NULL, this function always returns 1; otherwise checks the authentication in the http request and returns 1 only if there is a match; 0 otherwise.