token verifikation. Also removed the /verify call since it is now covered by /login.
20 lines
562 B
Python
20 lines
562 B
Python
from flask import Blueprint, request
|
|
from .. import impl
|
|
from ..services.auth_guard import auth_guard
|
|
import json
|
|
|
|
bp = Blueprint('participant', __name__)
|
|
|
|
@bp.route('/participant', methods=['get'])
|
|
@auth_guard() # no restriction by role
|
|
def GetParticipant():
|
|
|
|
if 'Authorization' in request.headers:
|
|
token = request.headers.get('Authorization')
|
|
options = {}
|
|
options["user_id"] = request.args.get("user_id")
|
|
return impl.participant.GetParticipant(options)
|
|
else:
|
|
return json.dumps("not authenticated"), 403
|
|
|