|
|
@@ -96,7 +96,7 @@ extern "C"
|
|
|
* they are parsed as decimal numbers.
|
|
|
* Example: 0x01093001 = 1.9.30-1.
|
|
|
*/
|
|
|
-#define MHD_VERSION 0x00097703
|
|
|
+#define MHD_VERSION 0x00097704
|
|
|
|
|
|
/* If generic headers don't work on your platform, include headers
|
|
|
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,
|
|
|
struct MHD_BasicAuthInfo
|
|
|
{
|
|
|
/**
|
|
|
- * The username, cannot be NULL
|
|
|
+ * The username, cannot be NULL.
|
|
|
+ * The buffer pointed by the @a username becomes invalid when the pointer
|
|
|
+ * to the structure is freed by #MHD_free().
|
|
|
*/
|
|
|
char *username;
|
|
|
|
|
|
@@ -5804,7 +5806,9 @@ struct MHD_BasicAuthInfo
|
|
|
size_t username_len;
|
|
|
|
|
|
/**
|
|
|
- * The password, may be NULL if password is not encoded by the client
|
|
|
+ * The password, may be NULL if password is not encoded by the client.
|
|
|
+ * The buffer pointed by the @a password becomes invalid when the pointer
|
|
|
+ * to the structure is freed by #MHD_free().
|
|
|
*/
|
|
|
char *password;
|
|
|
|
|
|
@@ -5830,21 +5834,6 @@ struct MHD_BasicAuthInfo
|
|
|
_MHD_EXTERN struct MHD_BasicAuthInfo *
|
|
|
MHD_basic_auth_get_username_password3 (struct MHD_Connection *connection);
|
|
|
|
|
|
-/**
|
|
|
- * Get the username and password from the basic authorization header sent by the client
|
|
|
- *
|
|
|
- * @param connection The MHD connection structure
|
|
|
- * @param[out] password a pointer for the password, free using #MHD_free().
|
|
|
- * @return NULL if no username could be found, a pointer
|
|
|
- * to the username if found, free using #MHD_free().
|
|
|
- * @deprecated use #MHD_basic_auth_get_username_password3()
|
|
|
- * @ingroup authentication
|
|
|
- */
|
|
|
-_MHD_EXTERN char *
|
|
|
-MHD_basic_auth_get_username_password (struct MHD_Connection *connection,
|
|
|
- char **password);
|
|
|
-
|
|
|
-
|
|
|
/**
|
|
|
* Queues a response to request basic authentication from the client.
|
|
|
*
|
|
|
@@ -5857,7 +5846,7 @@ MHD_basic_auth_get_username_password (struct MHD_Connection *connection,
|
|
|
* The @a response is modified by this function. The modified response object
|
|
|
* can be used to respond subsequent requests by #MHD_queue_response()
|
|
|
* function with status code #MHD_HTTP_UNAUTHORIZED and must not be used again
|
|
|
- * with MHD_queue_basic_auth_fail_response3() function. The response could
|
|
|
+ * with MHD_queue_basic_auth_required_response3() function. The response could
|
|
|
* be destroyed right after call of this function.
|
|
|
*
|
|
|
* @param connection the MHD connection structure
|
|
|
@@ -5868,14 +5857,28 @@ MHD_basic_auth_get_username_password (struct MHD_Connection *connection,
|
|
|
* @param response the response object to modify and queue; the NULL
|
|
|
* is tolerated
|
|
|
* @return #MHD_YES on success, #MHD_NO otherwise
|
|
|
- * @note Available since #MHD_VERSION 0x00097701
|
|
|
+ * @note Available since #MHD_VERSION 0x00097704
|
|
|
* @ingroup authentication
|
|
|
*/
|
|
|
_MHD_EXTERN enum MHD_Result
|
|
|
-MHD_queue_basic_auth_fail_response3 (struct MHD_Connection *connection,
|
|
|
- const char *realm,
|
|
|
- int prefer_utf8,
|
|
|
- struct MHD_Response *response);
|
|
|
+MHD_queue_basic_auth_required_response3 (struct MHD_Connection *connection,
|
|
|
+ const char *realm,
|
|
|
+ int prefer_utf8,
|
|
|
+ struct MHD_Response *response);
|
|
|
+
|
|
|
+/**
|
|
|
+ * Get the username and password from the basic authorization header sent by the client
|
|
|
+ *
|
|
|
+ * @param connection The MHD connection structure
|
|
|
+ * @param[out] password a pointer for the password, free using #MHD_free().
|
|
|
+ * @return NULL if no username could be found, a pointer
|
|
|
+ * to the username if found, free using #MHD_free().
|
|
|
+ * @deprecated use #MHD_basic_auth_get_username_password3()
|
|
|
+ * @ingroup authentication
|
|
|
+ */
|
|
|
+_MHD_EXTERN char *
|
|
|
+MHD_basic_auth_get_username_password (struct MHD_Connection *connection,
|
|
|
+ char **password);
|
|
|
|
|
|
|
|
|
/**
|
|
|
@@ -5888,7 +5891,7 @@ MHD_queue_basic_auth_fail_response3 (struct MHD_Connection *connection,
|
|
|
* @param realm the realm presented to the client
|
|
|
* @param response response object to modify and queue; the NULL is tolerated
|
|
|
* @return #MHD_YES on success, #MHD_NO otherwise
|
|
|
- * @deprecated use MHD_queue_basic_auth_fail_response3()
|
|
|
+ * @deprecated use MHD_queue_basic_auth_required_response3()
|
|
|
* @ingroup authentication
|
|
|
*/
|
|
|
_MHD_EXTERN enum MHD_Result
|