13 lines
272 B
Python
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
|