烧瓶的Paseto集成

Flask-Paseto的Python项目详细描述


帕塞托烧瓶

FLASK-PASETO为您的FLASK应用程序添加pasetov2的基本支持。

安装

烧瓶Paseto依赖于paseto,后者又依赖于pynadium。 pysoduim是流行的libsoduim密码库的包装器。 {mac}演示如何在windows上安装liba4}。 在linux上,可以使用sudo apt-get install -y libsodium-dev或{}安装libnadium,具体取决于您的linux发行版。在

要安装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

配置选项

OptionDescription
PASETO_SECRET_KEYThis is the secret key used by paseto to sign your data. It requires 32 byte strings
PASETO_PUBLIC_KEYThis is the public key generated as part of the key pair generated for paseto
PASETO_PRIVATE_KEYThis is the private key generated as part of the key pair generated for paseto
PASETO_EXPIRATION_DELTAThe additional time from the current time the token was created before expiration

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java如何从IBM MQ的JMSException检测可恢复错误   java Lucene6。4.2:找不到类,尝试添加查询。   Java Pdf差异库   在Java中多线程处理我的线程   java将字符串传递给Uri。下载中的parse()   java在列表中查找原语位置   java JPA条件从另一个查询中选择   java中的强制转换和转换   java如何在没有上下文的情况下获取SOAP Web服务(Apache Axis 1.4)的调用客户端的IP地址   java Android IllegalBlockSizeException:解密中最后一个块未完成   java Jersey是否要自定义无效资源路径的错误处理?   如何将JavaCVS web项目转换为基于maven的web项目?   java如何检查通用列表是否与jUnit相等?   arraylist java。util。尝试使用迭代器时发生ConcurrentModificationException错误   使用springsecurity,jsp上的java${u csrf.token}始终为空   sql使用java从临时表中选择数据   spring验证中的java@Notnull和@Pattern无效   java如何使用jQuery将包含对象数组的对象数组传递给Spring MVC控制器?