# wsapi_basic_auth **Repository Path**: mirrors_keplerproject/wsapi_basic_auth ## Basic Information - **Project Name**: wsapi_basic_auth - **Description**: HTTP Basic Authentication for WSAPI - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-08-09 - **Last Updated**: 2026-02-14 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README **This repository is now archived. wsapi_basic_auth was moved to the samples/ folder of the WSAPI repository.** --- # wsapi.basic_auth A "wrapper function" that provides HTTP basic authentication for WSAPI apps. Example: ``` function run(wsapi_env) return wsapi.basic_auth.run(wsapi_env, "my site", function(wsapi_env) local user, pass = wsapi_env.basic_auth.user, wsapi_env.basic_auth.password ... end) end ``` The wsapi_env received is extended with a "basic_auth" field, which is a table containing fields "user" and "password". Alternatively, a fourth argement may be given, with a function that performs the authentication check. ``` function run(wsapi_env) return wsapi.basic_auth.run(wsapi_env, "my site", my_run, my_check_user_pass) end ``` This module was put together by Hisham Muhammad, based on insights on the matter in the lua-l mailing list by Bjorn Kalkbrenner and Raphael Szwarc.