Comment on How to enhance Caddy's basic_auth?
dgdft@lemmy.world 1 week ago
How does programmatic access tie into the desire for a login form?
Either way, you can do a login form -> basic auth forwarding page by rigging up some simple JS, or access programmatically in a direct way by simply setting a manual Authorization header.
tubbadu@lemmy.kde.social 1 week ago
I would like to keep files with “private” information protected from public access, but I would like to access them from a script. An example: i wrote a karaoke application to use with my friends, they have to go to a webpage and select the songs they like, and then the karaoke app connects to the server to get the updated preference file. I would like that the users had a “nice login form” to select their songs, and then I’d like my karaoke app to easily download the file while still keeping it password-protected
dgdft@lemmy.world 1 week ago
Yeah, you don’t need to extend Caddy at all for that.
Add a properly-formatted Authorization header to any requests you make to the server and it’ll work. See Wikipedia page for header string format:
en.wikipedia.org/…/Basic_access_authentication