Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added required arguments #81

Merged
merged 5 commits into from
Oct 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions project/using-flask-restful/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def missing_token_callback(error):


@jwt.needs_fresh_token_loader
def token_not_fresh_callback():
def token_not_fresh_callback(jwt_header, jwt_payload):
return (
jsonify(
{"description": "The token is not fresh.", "error": "fresh_token_required"}
Expand All @@ -83,7 +83,7 @@ def token_not_fresh_callback():


@jwt.revoked_token_loader
def revoked_token_callback():
def revoked_token_callback(jwt_header, jwt_payload):
return (
jsonify(
{"description": "The token has been revoked.", "error": "token_revoked"}
Expand Down
4 changes: 2 additions & 2 deletions project/using-flask-restx/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def missing_token_callback(error):


@jwt.needs_fresh_token_loader
def token_not_fresh_callback():
def token_not_fresh_callback(jwt_header, jwt_payload):
return (
jsonify(
{"description": "The token is not fresh.", "error": "fresh_token_required"}
Expand All @@ -83,7 +83,7 @@ def token_not_fresh_callback():


@jwt.revoked_token_loader
def revoked_token_callback():
def revoked_token_callback(jwt_header, jwt_payload):
return (
jsonify(
{"description": "The token has been revoked.", "error": "token_revoked"}
Expand Down
4 changes: 2 additions & 2 deletions project/using-flask-smorest/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def missing_token_callback(error):


@jwt.needs_fresh_token_loader
def token_not_fresh_callback():
def token_not_fresh_callback(jwt_header, jwt_payload):
return (
jsonify(
{"description": "The token is not fresh.", "error": "fresh_token_required"}
Expand All @@ -91,7 +91,7 @@ def token_not_fresh_callback():


@jwt.revoked_token_loader
def revoked_token_callback():
def revoked_token_callback(jwt_header, jwt_payload):
return (
jsonify(
{"description": "The token has been revoked.", "error": "token_revoked"}
Expand Down