Skip to content
This repository has been archived by the owner on Jul 3, 2019. It is now read-only.

rsdy/flask-secretbox-session

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 

Flask-SecretBox-Session

This is a Flask session serializer that encrypts the session using crypto_secretbox. Flask-SecretBox-Session is a drop-in replacement for the default Flask session serializer.

Usage

From the virtualenv, run

pip install flask-secretbox-session

Then in your flask application, add

from secretbox_session import SecretboxCookieSessionInterface
app.session_interface = SecretboxCookieSessionInterface()

To override the key used for storing the timestamp for avoiding clashes with your own session objects, you can use the timestamp_key named argument, like so:

app.session_interface = SecretboxCookieSessionInterface(timestamp_key='__timestamp')

The default value of timestamp_key is '__session_timestamp__'.

License

Distributed under the 2-clause BSD.

About

Flask client side session serializer, using Sodium SecretBox authenticated encryption

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published