"""
"""
from functools import wraps
import jwt
import datetime
from pyDes import des, PAD_PKCS5
from flask import request
SECRECT_KEY = 'secret'
import base64
KEY='c8eahd59'
# from rest_framework.response import Response
def checkToken():
def decorated(func):
@wraps(func)
def wrapper(*args, **kwargs):
try:
# token=base64.b64decode(request.headers['token'])
token = b'@\xc1\xcb\xd9\xaf\xf6\x86\x9aH\xf2(\xeeN\xba\x0b\x11F+\xee\xc1\xd7\xdb\x92\x9d-\x9e .\xd3\xa4@\xf5\xab\xc7\xa5\xdc\x18U\x04\xd6\xdb\x863\xbc<\xde\'\x08\x87\xc4S\xb6~\xa3]\x1a\xba;n\xd2\xe1;\xa5W\x02>3\x8a9\x8c\xab<9SS\xfe\xa4\xdb\x1cI\xcf\x1e_L#Y\x87\xb79\xd7BB\x1a\xa1\xfc\x94\xf4\xbaf\x10c)qq\xef\xdcJ}\xd0)\xa1\x8d^Syj\xa7\xe7\x91s\x95\xe3K\x08S\x94mt\xf5\xa5\xd8%!\xb08\xf9"\xc3\xdei\x17\xe8\xd8\x1a\xd3\xaa\x9c7\x10|gq'
token
python jwt用装饰器实现,并进行DES加密
最新推荐文章于 2024-06-05 10:51:54 发布