By default flask-restly
assumes that client is authorized
If authorization provider return False
, then Forbidden
exception is raised.
from flask_restly.decorator import auth
To implement Your custom authorization function:
@auth.provider
def authorize():
return True
In some cases authorization should not be verified for particular endpoint(s):
@resource(name='some')
class SomeResource():
@get('/')
@auth.unauthorized
def can_be_not_authorized(self):
return