]> git.plutz.net Git - shellwiki/commitdiff
support for authentication plugins
authorPaul Hänsch <paul@plutz.net>
Mon, 26 Feb 2024 15:48:14 +0000 (16:48 +0100)
committerPaul Hänsch <paul@plutz.net>
Mon, 26 Feb 2024 15:48:14 +0000 (16:48 +0100)
auth/default.sh [new file with mode: 0644]
index.cgi

diff --git a/auth/default.sh b/auth/default.sh
new file mode 100644 (file)
index 0000000..816ad70
--- /dev/null
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+. "$_EXEC/cgilite/users.sh"
index 79e5e00ee4b670445f7af9d901ffbf2bfb968e6f..c121c3879b050597602b80cb8e39845254fdf737 100755 (executable)
--- a/index.cgi
+++ b/index.cgi
 # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
 # IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 
-. "${_EXEC:-${0%/*}}/cgilite/cgilite.sh"
-. "${_EXEC}/cgilite/session.sh"
-. "${_EXEC}/cgilite/users.sh"
-. "${_EXEC}/tools.sh"
-. "${_EXEC}/acl.sh"
-
 export REV_PAGES=${REV_PAGES:-true}
 export REV_ATTACHMENTS=${REV_ATTACHMENTS:-false}
 export WIKI_THEME="${WIKI_THEME:-default}"
 export SEARCH_INDEX="${SEARCH_INDEX:-true}"
+export USER_AUTH="${USER_AUTH:-default}"
+
+. "${_EXEC:-${0%/*}}/cgilite/cgilite.sh"
+. "${_EXEC}/cgilite/session.sh"
+. "${_EXEC}/auth/${USER_AUTH}.sh"
+. "${_EXEC}/tools.sh"
+. "${_EXEC}/acl.sh"
+. "${_EXEC}/themes/${WIKI_THEME}.sh"
 
 which git >/dev/null || REV_PAGES=false
 [ "$REV_PAGES" != true ] && REV_ATTACHMENTS=false
 
-. "${_EXEC}/themes/${WIKI_THEME}.sh"
-
 # Renew session cookie, only if cookie already set
 [ "$(COOKIE session)" ] && SESSION_COOKIE