Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

How to secure an endpoint for selected users with Flask-JWT-Extended

from flask import abort
from flask_jwt_extended import current_user

@app.route('/users/edit')
@app.route('/users/<userid:int>/edit')
@userid_must_match
def users_edit():
    # ... handle view for matching user via current_user
 
PREVIOUS NEXT
Tagged: #How #secure #endpoint #selected #users
ADD COMMENT
Topic
Name
1+6 =