flask-paranoid
Simple user session protection.
Quick Start
Here is a simple application that uses Flask-Paranoid to protect the user session:
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
Release files for Flask-Paranoid 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| Flask-Paranoid-0.3.0.tar.gz | 4.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| Flask_Paranoid-0.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.8 kB
Release files / Flask-Paranoid-0.3.0.tar.gz
| Download URL | Flask-Paranoid-0.3.0.tar.gz |
|---|---|
| Size | 4.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
46c049ba701b25f1ccf3988164e1bfb12320ab55f1de66384b012f7767bb8058
|
|
BLAKE2b-256 checksum How to use checksums |
f0038e4eb2d4e3ffdd436a71f273dc6443c30766b55194a009264ee6eb2c5fde
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.0 CPython/3.9.10
|
Release files / Flask_Paranoid-0.3.0-py3-none-any.whl
| Download URL | Flask_Paranoid-0.3.0-py3-none-any.whl |
|---|---|
| Size | 4.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8cb48aadfbee5aefe8a75e7436f3a31e426a170a893f022a50e7e4f569ad0850
|
|
BLAKE2b-256 checksum How to use checksums |
f3d73c054c416a575bc1775ef506fddd0faef4af734a8047d815c7cbb600eb5a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.0 CPython/3.9.10
|