烧瓶的Paseto集成
Flask-Paseto的Python项目详细描述
帕塞托烧瓶
FLASK-PASETO为您的FLASK应用程序添加pasetov2的基本支持。
安装
烧瓶Paseto依赖于paseto,后者又依赖于pynadium。
pysoduim是流行的libsoduim密码库的包装器。
{mac}演示如何在windows上安装liba4}。
在linux上,可以使用sudo apt-get install -y libsodium-dev
或{
要安装FLask Paseto,请使用下面的命令获取最新版本
pip install flask_paseto
示例用法
^{pr2}$客户端http请求必须提供生成的paseto令牌
GET /protected/public HTTP/1.1
Authorization: Bearer v2.local.epxJJp-rchdlMondp12dxN9MV7GACjW0swwyOgo5pliQo2fJmC-1WqhrmWDTQBkg08In7zXD6ieM-xpaY2eMWr-mAu64nVi8VvTWi5bc3dhGHGR-Mg8QQ8HJIzPldLfSDLQXwQ
配置选项
Option | Description |
---|---|
PASETO_SECRET_KEY | This is the secret key used by paseto to sign your data. It requires 32 byte strings |
PASETO_PUBLIC_KEY | This is the public key generated as part of the key pair generated for paseto |
PASETO_PRIVATE_KEY | This is the private key generated as part of the key pair generated for paseto |
PASETO_EXPIRATION_DELTA | The additional time from the current time the token was created before expiration |
- 项目
标签: