fix: itsdangerous deprecated JWS Serializer, replace it

This commit is contained in:
liaralabs 2022-02-18 18:36:01 -08:00
parent 98dde2e9a3
commit 60a9054c06
2 changed files with 3 additions and 2 deletions

View file

@ -9,8 +9,8 @@ import hashlib
import logging
from flask import request, Response, current_app, g, abort, make_response
from itsdangerous import JSONWebSignatureSerializer as Serializer
from itsdangerous import BadSignature
from authlib.jose import JsonWebSignature as Serializer
from passlib.apache import HtpasswdFile
@ -97,7 +97,7 @@ class HtPasswdAuth:
"""
Setup crypto sig.
"""
return Serializer(current_app.config['FLASK_SECRET'])
return Serializer.serialize(current_app.config['FLASK_SECRET'])
def get_hashhash(self, username):
"""

View file

@ -5,3 +5,4 @@ flask-limiter
eventlet
requests
dnspython==1.16.0; python_version == "3.5"
authlib