python - restful api server 中如何用装饰器来验证访问合法性
PHP中文网
PHP中文网 2017-04-18 09:58:06
0
1
325
PHP中文网
PHP中文网

认证高级PHP讲师

reply all(1)
巴扎黑

Ugh. . Isn’t there already a plan in the information you found? Why not give it a try?

from flask_restful import Resource
class Foo(Resource): 
    decorators = [auth.login_required]

    def get(self): 
        pass 
        
    def post(self): 
        pass
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!