diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 18:45:59 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 18:45:59 +0000 |
commit | 19fcec84d8d7d21e796c7624e521b60d28ee21ed (patch) | |
tree | 42d26aa27d1e3f7c0b8bd3fd14e7d7082f5008dc /src/civetweb/docs/api/mg_check_digest_access_authentication.md | |
parent | Initial commit. (diff) | |
download | ceph-19fcec84d8d7d21e796c7624e521b60d28ee21ed.tar.xz ceph-19fcec84d8d7d21e796c7624e521b60d28ee21ed.zip |
Adding upstream version 16.2.11+ds.upstream/16.2.11+dsupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | src/civetweb/docs/api/mg_check_digest_access_authentication.md | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/src/civetweb/docs/api/mg_check_digest_access_authentication.md b/src/civetweb/docs/api/mg_check_digest_access_authentication.md new file mode 100644 index 000000000..fec3ad3ba --- /dev/null +++ b/src/civetweb/docs/api/mg_check_digest_access_authentication.md @@ -0,0 +1,37 @@ +# Civetweb API Reference + +### `mg_check_digest_access_authentication( conn, realm, filename );` + +### Parameters + +| Parameter | Type | Description | +| :--- | :--- | :--- | +|**`conn`**|`struct mg_connection *`| A pointer to the connection to be used to send data | +|**`realm`**|`const char *`| The requested authentication realm or NULL | +|**`filename`**|`const char *`| The path to the passwords file | + +### Return Value + +| Type | Description | +| :--- | :--- | +|`int`| An integer indicating success or failure | + +### Description + +This function can be used to check if a request header contains HTTP digest authentication +information, matching user and password encoded within the password file. +If the authentication realm (also called authentication domain) is NULL, the parameter +`authentication_domain` as specified in the server configuration (`mg_start()`) is used. + +A positive return value means, the user name, realm and a correct password hash have been +found in the passwords file. +A return of 0 means, reading the password file succeeded, but there was no matching user, +realm and password. +The function returns a negative number on errors. + +### See Also + +* [`mg_send_digest_access_authentication_request();`](mg_send_digest_access_authentication_request.md) +* [`mg_modify_passwords_file();`](mg_modify_passwords_file.md) +* [`mg_start();`](mg_start.md) + |