This example combines BAS authentication and authorization with a Web File Server/WebDAV endpoint. It uses a JSON user database, optional ACL authorizer constraints, HTTP Digest authentication, and request:login() for programmatic login testing.
Use it for JSON user databases, role-based authorization, file-server ACLs, and comparing authentication-only versus authentication-plus-authorization behavior.
README.md- users, roles, ACL behavior, and testing notes.www/.preload- Web File Server, JSON users, authorizer constraints, and file tree setup.www/index.lsp- programmatic login test page.www/logout.lsp- logout behavior and Digest limitation notes.mako.conf- authorizer toggle for Mako Server tests.
Do not invent BAS JSON user, authenticator, authorizer, Web File Server, or request login APIs.
-
BAS documentation bundle (
basapi.md)
https://realtimelogic.com/downloads/basapi.md -
BAS tutorials bundle (
tutorials.md)
https://realtimelogic.com/downloads/tutorials.md -
Mako Server tutorials bundle (
tutorials.md)
https://makoserver.net/download/tutorials.md
Reference priority:
basapi.mdfor API syntax, signatures, and behavior.tutorials.mdfor architecture, security, deployment, and tutorial context.- If tutorial guidance conflicts with API details, trust the API reference.
www/.preload- creates the WebDAV root, mounts/fs/, defines users and ACL constraints, installs authenticator/authorizer, and creates sample family directories.www/index.lsp- testsrequest:login(username)and links to Digest-protected/fs/.www/logout.lsp- handles logout for programmatic login and explains browser-controlled Digest credentials.mako.conf- optional authorizer toggle for comparison testing.
- Keep authentication and authorization concepts separate in explanations and code.
- If changing users, roles, or ACLs, update
createUserDB()andcreateConstraints()together. - Preserve the authorizer toggle when demonstrating behavior differences.
- For Xedge adaptation, replace or expose the
mako.conftoggle through an Xedge-appropriate setting. - Do not use demo passwords in production.
cd JSON-File-Server
mako -l::wwwTest /fs/ with Digest users guest, kids, mom, and dad, then test the programmatic login form and compare behavior with the authorizer disabled.