mirror of
https://github.com/swizzin/swizzin_dashboard.git
synced 2024-09-20 06:46:08 +08:00
fix: itsdangerous deprecated JWS Serializer, replace it
This commit is contained in:
parent
98dde2e9a3
commit
60a9054c06
|
@ -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):
|
||||
"""
|
||||
|
|
|
@ -5,3 +5,4 @@ flask-limiter
|
|||
eventlet
|
||||
requests
|
||||
dnspython==1.16.0; python_version == "3.5"
|
||||
authlib
|
||||
|
|
Loading…
Reference in a new issue