Basic Auth API: renamed struct and union members

This commit is contained in:
Evgeny Grin (Karlson2k)
2024-12-31 12:20:31 +01:00
parent 92b5e6e0a1
commit 92f24c17a3
7 changed files with 17 additions and 17 deletions
+1 -1
View File
@@ -49,7 +49,7 @@ req_cb (void *cls,
static const size_t allowed_password_len =
(sizeof(allowed_password) / sizeof(char) - 1);
union MHD_RequestInfoDynamicData req_data;
const struct MHD_BasicAuthInfo *creds; /* a shortcut */
const struct MHD_AuthBasicCreds *creds; /* a shortcut */
enum MHD_StatusCode res;
(void) cls;
+5 -5
View File
@@ -8257,7 +8257,7 @@ MHD_STATIC_INLINE_END_
*
* If access to any resource should be limited to specific users, authenticated
* by Basic Authentication mechanism, and the request for this resource does not
* have Basic Authentication information (see #MHD_BasicAuthInfo), then response
* have Basic Authentication information (see #MHD_AuthBasicCreds), then response
* with Basic Authentication "challenge" should be sent. This works as
* an indication that Basic Authentication should be used for the access.
*
@@ -8304,7 +8304,7 @@ MHD_FN_PAR_NONNULL_ (2) MHD_FN_PAR_CSTR_ (2);
*
* If access to any resource should be limited to specific users, authenticated
* by Basic Authentication mechanism, and the request for this resource does not
* have Basic Authentication information (see #MHD_BasicAuthInfo), then response
* have Basic Authentication information (see #MHD_AuthBasicCreds), then response
* with Basic Authentication "challenge" should be sent. This works as
* an indication that Basic Authentication should be used for the access.
*
@@ -8433,7 +8433,7 @@ MHD_STATIC_INLINE_END_
*
* @see #MHD_REQUEST_INFO_DYNAMIC_AUTH_BASIC_CREDS
*/
struct MHD_BasicAuthInfo
struct MHD_AuthBasicCreds
{
/**
* The username
@@ -10003,11 +10003,11 @@ union MHD_RequestInfoDynamicData
const struct MHD_DigestAuthInfo *v_dauth_info;
/**
* The information about client's basic auth.
* The username and password provided by the client's basic auth header.
* If #MHD_request_get_info_dynamic_sz() returns #MHD_SC_OK then this pointer
* is NOT NULL and at least the username data is provided.
*/
const struct MHD_BasicAuthInfo *v_auth_basic_creds;
const struct MHD_AuthBasicCreds *v_auth_basic_creds;
};
+5 -5
View File
@@ -3664,7 +3664,7 @@ MHD_STATIC_INLINE_END_
*
* If access to any resource should be limited to specific users, authenticated
* by Basic Authentication mechanism, and the request for this resource does not
* have Basic Authentication information (see #MHD_BasicAuthInfo), then response
* have Basic Authentication information (see #MHD_AuthBasicCreds), then response
* with Basic Authentication "challenge" should be sent. This works as
* an indication that Basic Authentication should be used for the access.
*
@@ -3711,7 +3711,7 @@ MHD_FN_PAR_NONNULL_(2) MHD_FN_PAR_CSTR_ (2);
*
* If access to any resource should be limited to specific users, authenticated
* by Basic Authentication mechanism, and the request for this resource does not
* have Basic Authentication information (see #MHD_BasicAuthInfo), then response
* have Basic Authentication information (see #MHD_AuthBasicCreds), then response
* with Basic Authentication "challenge" should be sent. This works as
* an indication that Basic Authentication should be used for the access.
*
@@ -3840,7 +3840,7 @@ MHD_STATIC_INLINE_END_
*
* @see #MHD_REQUEST_INFO_DYNAMIC_AUTH_BASIC_CREDS
*/
struct MHD_BasicAuthInfo
struct MHD_AuthBasicCreds
{
/**
* The username
@@ -5410,11 +5410,11 @@ union MHD_RequestInfoDynamicData
const struct MHD_DigestAuthInfo *v_dauth_info;
/**
* The information about client's basic auth.
* The username and password provided by the client's basic auth header.
* If #MHD_request_get_info_dynamic_sz() returns #MHD_SC_OK then this pointer
* is NOT NULL and at least the username data is provided.
*/
const struct MHD_BasicAuthInfo *v_auth_basic_creds;
const struct MHD_AuthBasicCreds *v_auth_basic_creds;
};
+1 -1
View File
@@ -117,7 +117,7 @@ MHD_INTERNAL MHD_FN_MUST_CHECK_RESULT_ MHD_FN_PAR_NONNULL_ALL_
MHD_FN_PAR_OUT_ (2) enum MHD_StatusCode
mhd_request_get_auth_basic_creds (
struct MHD_Request *restrict req,
const struct MHD_BasicAuthInfo **restrict v_auth_basic_creds)
const struct MHD_AuthBasicCreds **restrict v_auth_basic_creds)
{
enum MHD_StatusCode res;
mhd_assert (mhd_HTTP_STAGE_HEADERS_PROCESSED <=
+1 -1
View File
@@ -45,7 +45,7 @@
MHD_INTERNAL enum MHD_StatusCode
mhd_request_get_auth_basic_creds (
struct MHD_Request *restrict req,
const struct MHD_BasicAuthInfo **restrict v_auth_basic_creds)
const struct MHD_AuthBasicCreds **restrict v_auth_basic_creds)
MHD_FN_MUST_CHECK_RESULT_ MHD_FN_PAR_NONNULL_ALL_ MHD_FN_PAR_OUT_ (2);
#endif /* ! MHD_AUTH_BASIC_H */
+3 -3
View File
@@ -287,8 +287,8 @@ union mhd_ReqContentParsingData
#ifdef MHD_SUPPORT_AUTH_BASIC
/**
* Request Basic Auth internal data
* The same format as struct MHD_BasicAuthInfo, but wiht nullable username.
* Keep in sync with MHD_BasicAuthInfo!
* The same format as struct MHD_AuthBasicCreds, but wiht nullable username.
* Keep in sync with MHD_AuthBasicCreds!
*/
struct mhd_ReqAuthBasicInternalData
{
@@ -315,7 +315,7 @@ union mhd_ReqAuthBasicData
/**
* The external (application) Basic Auth data
*/
struct MHD_BasicAuthInfo extr;
struct MHD_AuthBasicCreds extr;
};
#endif /* MHD_SUPPORT_AUTH_BASIC */
@@ -736,7 +736,7 @@ MHDT_server_reply_check_basic_auth (
const char *cred = cls;
union MHD_RequestInfoDynamicData dd;
enum MHD_StatusCode sc;
const struct MHD_BasicAuthInfo *ba;
const struct MHD_AuthBasicCreds *ba;
/* should not be needed, except to make gcc happy */
memset (&dd,