I have a Flask-Restplus endpoint like so:
@api.route('/apps/<uid>')
@api.doc(params={'uid': 'UUID of the app agent.'})
class AppAgentAPI(Resource):
@login_required
@api.marshal_with(app_agent)
def get(self, uid):
...
Currently the swagger docs for this endpoint are public.
I'd like to restrict access to swagger docs to authenticated users only. (By authenticated I mean with respect to my Flask app).
Even better if I can insert some custom logic to make it role-based (ie: only admins within my app can see the docs to this endpoint, etc).
How do I do this?