Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

基于Yii2.0 使用restful接口 与前后台分离,现在要让某个用户只能访问指定的接口路径 实现对接口访问权限的控制


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
512 views
Welcome To Ask or Share your Answers For Others

1 Answer

和网页形式一样验权,只不过看这个restful如何保证无状态下的用户信息传递了。
如果个APP用,则一般使用token来保存用户数据
如果是给web用,则用cookie+session就可以了


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...