diff options
author | Joe Orton <jorton@apache.org> | 2024-10-11 18:20:44 +0200 |
---|---|---|
committer | Joe Orton <jorton@apache.org> | 2024-10-11 18:20:44 +0200 |
commit | 61db0638bf29e59af6b49d9cabb6c0ec1fbabb0e (patch) | |
tree | 5d0b79a0e33f3d6d9058e5e301e044a385ecedcd /modules/lua/lua_request.c | |
parent | ErrorLogFormat %{c}t is actually what ISO 8601 calls "extended" format. (diff) | |
download | apache2-61db0638bf29e59af6b49d9cabb6c0ec1fbabb0e.tar.xz apache2-61db0638bf29e59af6b49d9cabb6c0ec1fbabb0e.zip |
mod_lua: Make r.ap_auth_type writable
This completes the option of setting the remote user by the authentication
mechanism which actually verified the user.
One possible usecase is that a proxied (upstream) server performs the
authentication, but the access log of HTTPd does not contain this information.
The upstream server can pass this kind of information back to HTTPd and both
servers will have consistent access logs.
Submitted by: Michael Osipov <michaelo apache.org>
PR: 62497
Github: closes #67
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1921260 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'modules/lua/lua_request.c')
-rw-r--r-- | modules/lua/lua_request.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/modules/lua/lua_request.c b/modules/lua/lua_request.c index 6787bbfaf7..15605cd76c 100644 --- a/modules/lua/lua_request.c +++ b/modules/lua/lua_request.c @@ -2551,6 +2551,12 @@ static int req_newindex(lua_State *L) request_rec *r = ap_lua_check_request_rec(L, 1); key = luaL_checkstring(L, 2); + if (0 == strcmp("ap_auth_type", key)) { + const char *value = luaL_checkstring(L, 3); + r->ap_auth_type = apr_pstrdup(r->pool, value); + return 0; + } + if (0 == strcmp("args", key)) { const char *value = luaL_checkstring(L, 3); r->args = apr_pstrdup(r->pool, value); |