aboutsummaryrefslogtreecommitdiff
path: root/src/microhttpd/basicauth.c
diff options
context:
space:
mode:
authorEvgeny Grin (Karlson2k) <k2k@narod.ru>2022-07-30 22:28:25 +0300
committerEvgeny Grin (Karlson2k) <k2k@narod.ru>2022-08-09 21:24:54 +0300
commit6bf4168dfef7a679d4ef11c9e8a6c170ce050db1 (patch)
tree2391c34a24215b5efc8a76d43f6af9a7579d5f0a /src/microhttpd/basicauth.c
parent82d864759c08796d36139336df070b62b1a0e077 (diff)
downloadlibmicrohttpd-6bf4168dfef7a679d4ef11c9e8a6c170ce050db1.tar.gz
libmicrohttpd-6bf4168dfef7a679d4ef11c9e8a6c170ce050db1.zip
gen_auth: added support for two authorization headers in request
Diffstat (limited to 'src/microhttpd/basicauth.c')
-rw-r--r--src/microhttpd/basicauth.c23
1 files changed, 1 insertions, 22 deletions
diff --git a/src/microhttpd/basicauth.c b/src/microhttpd/basicauth.c
index 8c3adbdb..07b124f1 100644
--- a/src/microhttpd/basicauth.c
+++ b/src/microhttpd/basicauth.c
@@ -34,27 +34,6 @@
34 34
35 35
36/** 36/**
37 * Get request's Basic Authorisation parameters.
38 * @param connection the connection to process
39 * @return pointer to request Basic Authorisation parameters structure if
40 * request has such header (allocated in connection's pool),
41 * NULL otherwise.
42 */
43static const struct MHD_RqBAuth *
44get_rq_bauth_params (struct MHD_Connection *connection)
45{
46 const struct MHD_AuthRqHeader *rq_params;
47
48 rq_params = MHD_get_auth_rq_params_ (connection);
49 if ( (NULL == rq_params) ||
50 (MHD_AUTHTYPE_BASIC != rq_params->auth_type) )
51 return NULL;
52
53 return rq_params->params.bauth;
54}
55
56
57/**
58 * Get the username and password from the Basic Authorisation header 37 * Get the username and password from the Basic Authorisation header
59 * sent by the client 38 * sent by the client
60 * 39 *
@@ -73,7 +52,7 @@ MHD_basic_auth_get_username_password3 (struct MHD_Connection *connection)
73 size_t decoded_max_len; 52 size_t decoded_max_len;
74 struct MHD_BasicAuthInfo *ret; 53 struct MHD_BasicAuthInfo *ret;
75 54
76 params = get_rq_bauth_params (connection); 55 params = MHD_get_rq_bauth_params_ (connection);
77 56
78 if (NULL == params) 57 if (NULL == params)
79 return NULL; 58 return NULL;