Create New Item
Item Type
File
Folder
Item Name
Search file in folder and subfolders...
Are you sure you want to rename?
File Manager
/
ALFA_DATA
/
alfasymlink
/
root
/
opt
/
alt
/
python37
/
lib
/
python3.7
/
site-packages
/
paste
/
auth
/
__pycache__
:
form.cpython-37.pyc
Advanced Search
Upload
New Item
Settings
Back
Back Up
Advanced Editor
Save
B a�NJ � @ s\ d Z ddlmZmZ dZG dd� de�ZeZdgZdd� Z de krXdd lZejej d � d S )a( Authentication via HTML Form This is a very simple HTML form login screen that asks for the username and password. This middleware component requires that an authorization function taking the name and passsword and that it be placed in your application stack. This class does not include any session management code or way to save the user's authorization; however, it is easy enough to put ``paste.auth.cookie`` in your application stack. >>> from paste.wsgilib import dump_environ >>> from paste.httpserver import serve >>> from paste.auth.cookie import AuthCookieHandler >>> from paste.auth.form import AuthFormHandler >>> def authfunc(environ, username, password): ... return username == password >>> serve(AuthCookieHandler( ... AuthFormHandler(dump_environ, authfunc))) serving on... � )� construct_url�parse_formvarsa� <html> <head><title>Please Login!</title></head> <body> <h1>Please Login</h1> <form action="%s" method="post"> <dl> <dt>Username:</dt> <dd><input type="text" name="username"></dd> <dt>Password:</dt> <dd><input type="password" name="password"></dd> </dl> <input type="submit" name="authform" /> <hr /> </form> </body> </html> c @ s"