doushifen4060
doushifen4060
2015-08-09 05:55

限制在restful PHP API中的操作

  • php
  • angularjs

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.

  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

2条回答

为你推荐