限制在restful PHP API中的操作

I am creating an AngularJS application with a restful API written in PHP as backend. This is the first time I'm using AngularJS and PHP "together".

Angular is keeping track of the authentication of users using the ngCookies module. Some operations, like deleting stuff, should only be available for users with specific privileges. How can I make sure that "normal" users or users that have not logged in cannot access the deletion operations of the API?

Any ideas are appreciated.

查看全部
doushifen4060
doushifen4060
2015/08/09 05:55
  • php
  • angularjs
  • 点赞
  • 收藏
  • 回答
    私信
满意答案
查看全部

2个回复