Files
Assemblr-Backend/routes/utils.py
2023-10-27 06:04:15 +03:00

13 lines
272 B
Python

from functools import wraps
from flask import Blueprint
from flask_jwt_extended import verify_jwt_in_request
def jwt_protect_blueprint(blueprint) -> Blueprint:
@blueprint.before_request
def require_token():
verify_jwt_in_request()
return blueprint