mirror of
https://git.gnunet.org/libmicrohttpd.git
synced 2026-09-25 04:09:31 +03:00
Renamed one new basic auth function, improved doxy
This commit is contained in:
@@ -45,10 +45,10 @@ answer_to_connection (void *cls, struct MHD_Connection *connection,
|
||||
static const char *page =
|
||||
"<html><body>Authorization required</body></html>";
|
||||
response = MHD_create_response_from_buffer_static (strlen (page), page);
|
||||
ret = MHD_queue_basic_auth_fail_response3 (connection,
|
||||
"admins",
|
||||
MHD_YES,
|
||||
response);
|
||||
ret = MHD_queue_basic_auth_required_response3 (connection,
|
||||
"admins",
|
||||
MHD_YES,
|
||||
response);
|
||||
}
|
||||
else if ((strlen ("root") != auth_info->username_len) ||
|
||||
(0 != memcmp (auth_info->username, "root",
|
||||
@@ -63,10 +63,10 @@ answer_to_connection (void *cls, struct MHD_Connection *connection,
|
||||
static const char *page =
|
||||
"<html><body>Wrong username or password</body></html>";
|
||||
response = MHD_create_response_from_buffer_static (strlen (page), page);
|
||||
ret = MHD_queue_basic_auth_fail_response3 (connection,
|
||||
"admins",
|
||||
MHD_YES,
|
||||
response);
|
||||
ret = MHD_queue_basic_auth_required_response3 (connection,
|
||||
"admins",
|
||||
MHD_YES,
|
||||
response);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -89,10 +89,10 @@ ask_for_authentication (struct MHD_Connection *connection, const char *realm)
|
||||
if (! response)
|
||||
return MHD_NO;
|
||||
|
||||
ret = MHD_queue_basic_auth_fail_response3 (connection,
|
||||
realm,
|
||||
MHD_YES,
|
||||
response);
|
||||
ret = MHD_queue_basic_auth_required_response3 (connection,
|
||||
realm,
|
||||
MHD_YES,
|
||||
response);
|
||||
MHD_destroy_response (response);
|
||||
return ret;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user