diff options
author | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2023-10-06 14:11:55 +0300 |
---|---|---|
committer | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2023-10-06 14:12:31 +0300 |
commit | ce38b0fa79f0f0fc537163d39c1db0d76d616eb0 (patch) | |
tree | 53426ab5966bc0d8dec4df561acdd3f5aa6a22ab /src/include/microhttpd.h | |
parent | 596cc4b1cbe9c0db6cf3bfe1f2910d3883ac8ae8 (diff) | |
download | libmicrohttpd-ce38b0fa79f0f0fc537163d39c1db0d76d616eb0.tar.gz libmicrohttpd-ce38b0fa79f0f0fc537163d39c1db0d76d616eb0.zip |
Renamed one new basic auth function, improved doxy
Diffstat (limited to 'src/include/microhttpd.h')
-rw-r--r-- | src/include/microhttpd.h | 53 |
1 files changed, 28 insertions, 25 deletions
diff --git a/src/include/microhttpd.h b/src/include/microhttpd.h index 32d0bd31..e8057ae5 100644 --- a/src/include/microhttpd.h +++ b/src/include/microhttpd.h | |||
@@ -96,7 +96,7 @@ extern "C" | |||
96 | * they are parsed as decimal numbers. | 96 | * they are parsed as decimal numbers. |
97 | * Example: 0x01093001 = 1.9.30-1. | 97 | * Example: 0x01093001 = 1.9.30-1. |
98 | */ | 98 | */ |
99 | #define MHD_VERSION 0x00097703 | 99 | #define MHD_VERSION 0x00097704 |
100 | 100 | ||
101 | /* If generic headers don't work on your platform, include headers | 101 | /* If generic headers don't work on your platform, include headers |
102 | which define 'va_list', 'size_t', 'ssize_t', 'intptr_t', 'off_t', | 102 | which define 'va_list', 'size_t', 'ssize_t', 'intptr_t', 'off_t', |
@@ -5794,7 +5794,9 @@ MHD_queue_auth_fail_response (struct MHD_Connection *connection, | |||
5794 | struct MHD_BasicAuthInfo | 5794 | struct MHD_BasicAuthInfo |
5795 | { | 5795 | { |
5796 | /** | 5796 | /** |
5797 | * The username, cannot be NULL | 5797 | * The username, cannot be NULL. |
5798 | * The buffer pointed by the @a username becomes invalid when the pointer | ||
5799 | * to the structure is freed by #MHD_free(). | ||
5798 | */ | 5800 | */ |
5799 | char *username; | 5801 | char *username; |
5800 | 5802 | ||
@@ -5804,7 +5806,9 @@ struct MHD_BasicAuthInfo | |||
5804 | size_t username_len; | 5806 | size_t username_len; |
5805 | 5807 | ||
5806 | /** | 5808 | /** |
5807 | * The password, may be NULL if password is not encoded by the client | 5809 | * The password, may be NULL if password is not encoded by the client. |
5810 | * The buffer pointed by the @a password becomes invalid when the pointer | ||
5811 | * to the structure is freed by #MHD_free(). | ||
5808 | */ | 5812 | */ |
5809 | char *password; | 5813 | char *password; |
5810 | 5814 | ||
@@ -5831,21 +5835,6 @@ _MHD_EXTERN struct MHD_BasicAuthInfo * | |||
5831 | MHD_basic_auth_get_username_password3 (struct MHD_Connection *connection); | 5835 | MHD_basic_auth_get_username_password3 (struct MHD_Connection *connection); |
5832 | 5836 | ||
5833 | /** | 5837 | /** |
5834 | * Get the username and password from the basic authorization header sent by the client | ||
5835 | * | ||
5836 | * @param connection The MHD connection structure | ||
5837 | * @param[out] password a pointer for the password, free using #MHD_free(). | ||
5838 | * @return NULL if no username could be found, a pointer | ||
5839 | * to the username if found, free using #MHD_free(). | ||
5840 | * @deprecated use #MHD_basic_auth_get_username_password3() | ||
5841 | * @ingroup authentication | ||
5842 | */ | ||
5843 | _MHD_EXTERN char * | ||
5844 | MHD_basic_auth_get_username_password (struct MHD_Connection *connection, | ||
5845 | char **password); | ||
5846 | |||
5847 | |||
5848 | /** | ||
5849 | * Queues a response to request basic authentication from the client. | 5838 | * Queues a response to request basic authentication from the client. |
5850 | * | 5839 | * |
5851 | * The given response object is expected to include the payload for | 5840 | * The given response object is expected to include the payload for |
@@ -5857,7 +5846,7 @@ MHD_basic_auth_get_username_password (struct MHD_Connection *connection, | |||
5857 | * The @a response is modified by this function. The modified response object | 5846 | * The @a response is modified by this function. The modified response object |
5858 | * can be used to respond subsequent requests by #MHD_queue_response() | 5847 | * can be used to respond subsequent requests by #MHD_queue_response() |
5859 | * function with status code #MHD_HTTP_UNAUTHORIZED and must not be used again | 5848 | * function with status code #MHD_HTTP_UNAUTHORIZED and must not be used again |
5860 | * with MHD_queue_basic_auth_fail_response3() function. The response could | 5849 | * with MHD_queue_basic_auth_required_response3() function. The response could |
5861 | * be destroyed right after call of this function. | 5850 | * be destroyed right after call of this function. |
5862 | * | 5851 | * |
5863 | * @param connection the MHD connection structure | 5852 | * @param connection the MHD connection structure |
@@ -5868,14 +5857,28 @@ MHD_basic_auth_get_username_password (struct MHD_Connection *connection, | |||
5868 | * @param response the response object to modify and queue; the NULL | 5857 | * @param response the response object to modify and queue; the NULL |
5869 | * is tolerated | 5858 | * is tolerated |
5870 | * @return #MHD_YES on success, #MHD_NO otherwise | 5859 | * @return #MHD_YES on success, #MHD_NO otherwise |
5871 | * @note Available since #MHD_VERSION 0x00097701 | 5860 | * @note Available since #MHD_VERSION 0x00097704 |
5872 | * @ingroup authentication | 5861 | * @ingroup authentication |
5873 | */ | 5862 | */ |
5874 | _MHD_EXTERN enum MHD_Result | 5863 | _MHD_EXTERN enum MHD_Result |
5875 | MHD_queue_basic_auth_fail_response3 (struct MHD_Connection *connection, | 5864 | MHD_queue_basic_auth_required_response3 (struct MHD_Connection *connection, |
5876 | const char *realm, | 5865 | const char *realm, |
5877 | int prefer_utf8, | 5866 | int prefer_utf8, |
5878 | struct MHD_Response *response); | 5867 | struct MHD_Response *response); |
5868 | |||
5869 | /** | ||
5870 | * Get the username and password from the basic authorization header sent by the client | ||
5871 | * | ||
5872 | * @param connection The MHD connection structure | ||
5873 | * @param[out] password a pointer for the password, free using #MHD_free(). | ||
5874 | * @return NULL if no username could be found, a pointer | ||
5875 | * to the username if found, free using #MHD_free(). | ||
5876 | * @deprecated use #MHD_basic_auth_get_username_password3() | ||
5877 | * @ingroup authentication | ||
5878 | */ | ||
5879 | _MHD_EXTERN char * | ||
5880 | MHD_basic_auth_get_username_password (struct MHD_Connection *connection, | ||
5881 | char **password); | ||
5879 | 5882 | ||
5880 | 5883 | ||
5881 | /** | 5884 | /** |
@@ -5888,7 +5891,7 @@ MHD_queue_basic_auth_fail_response3 (struct MHD_Connection *connection, | |||
5888 | * @param realm the realm presented to the client | 5891 | * @param realm the realm presented to the client |
5889 | * @param response response object to modify and queue; the NULL is tolerated | 5892 | * @param response response object to modify and queue; the NULL is tolerated |
5890 | * @return #MHD_YES on success, #MHD_NO otherwise | 5893 | * @return #MHD_YES on success, #MHD_NO otherwise |
5891 | * @deprecated use MHD_queue_basic_auth_fail_response3() | 5894 | * @deprecated use MHD_queue_basic_auth_required_response3() |
5892 | * @ingroup authentication | 5895 | * @ingroup authentication |
5893 | */ | 5896 | */ |
5894 | _MHD_EXTERN enum MHD_Result | 5897 | _MHD_EXTERN enum MHD_Result |