Skip to the posts
Buffalo's neighborhood journals since 2003 🍀 Patrick Spicy Devil Logan🌭 Sahlen🥨 Weber Spank🥟 Pierogi🐸 Scaj🍺 Labatt Utica Pink Cherio❄️ Snow Murder

zobar’s journal

code

· 🌡️ 60°F

Because I know everyone's been holding their breath for this, here's the HTTP auth Javascript server-side script and database layout

Notes:
- does not require any hooks in your HTML code; just make sure your form has fields named 'username' and 'password' and import the Javascript
- can be attached to any form with an access-restricted target; script will pre-authenticate and, if successful, send the rest of the form as usual.
- You're not going to be able to use the server script as-is because it's kind of dependent on other parts of the project. You're not going to be able to read the server script as-is because it's Python. [Also in the full version you can change your authentication realm, and users in the special '_administrator' realm can log in to anyone's site.]
- no backwards Internet Explorer compatibility code in the Javascript
- on successful authentication, 'validate' returns 204 No Content. on unsuccessful authentication, server returns 400 Bad Request.

- Z

💬 1 comment

  1. dragonlady7 ·

    Jesus you're hot when you geek out.
    • fans self*

💬 Write a comment