portable-devtools / pgsql /pgAdmin 4 /python /Lib /site-packages /Flask_Paranoid-0.3.0.dist-info /METADATA
| Metadata-Version: 2.1 | |
| Name: Flask-Paranoid | |
| Version: 0.3.0 | |
| Summary: Simple user session protection | |
| Home-page: https://github.com/miguelgrinberg/flask-paranoid | |
| Author: Miguel Grinberg | |
| Author-email: miguel.grinberg@gmail.com | |
| License: UNKNOWN | |
| Project-URL: Bug Tracker, https://github.com/miguelgrinberg/flask-paranoid/issues | |
| Platform: UNKNOWN | |
| Classifier: Intended Audience :: Developers | |
| Classifier: Programming Language :: Python :: 3 | |
| Classifier: License :: OSI Approved :: MIT License | |
| Classifier: Operating System :: OS Independent | |
| Requires-Python: >=3.6 | |
| Description-Content-Type: text/markdown | |
| License-File: LICENSE | |
| Requires-Dist: Flask (>=0.10) | |
| flask-paranoid | |
| ============== | |
| [](https://github.com/miguelgrinberg/flask-paranoid/actions) [](https://codecov.io/gh/miguelgrinberg/flask-paranoid) | |
| Simple user session protection. | |
| Quick Start | |
| ----------- | |
| Here is a simple application that uses Flask-Paranoid to protect the user session: | |
| ```python | |
| from flask import Flask | |
| from flask_paranoid import Paranoid | |
| app = Flask(__name__) | |
| app.config['SECRET_KEY'] = 'top-secret!' | |
| paranoid = Paranoid(app) | |
| paranoid.redirect_view = '/' | |
| @app.route('/') | |
| def index(): | |
| return render_template('index.html') | |
| ``` | |
| When a client connects to this application, a "paranoid" token will be | |
| generated according to the IP address and user agent. In all subsequent | |
| requests, the token will be recalculated and checked against the one computed | |
| for the first request. If the session cookie is stolen and the attacker tries | |
| to use it from another location, the generated token will be different, and in | |
| that case the extension will clear the session and block the request. | |
| Resources | |
| --------- | |
| - [Documentation](http://pythonhosted.org/Flask-Paranoid) | |
| - [PyPI](https://pypi.python.org/pypi/flask-paranoid) | |
| - [Change Log](https://github.com/miguelgrinberg/flask-paranoid/blob/main/CHANGES.md) | |