PHP中的REST认证(CodeIgniter) [英] REST Authentication in PHP (CodeIgniter)

查看:149
本文介绍了PHP中的REST认证(CodeIgniter)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的Web应用程序中编写REST API。应用程序是使用CodeIgniter框架编写的。应用程序本身工作正常,但我坚持做REST验证。我认为基本的Http身份验证将足够好一段时间。公共API尚未规划。

I writing REST API form my web application. Application is written using CodeIgniter framework. Application itself is working fine, but I'm stuck on making REST Authentication. I think that basic Http Authentication will be good enough for some time. Public API is not yet planned.

有任何代码示例如何实现REST验证,所以在用户验证后,他可以自由地调用所有受保护的方法。

Is there any code example how to achieve REST Authentication so after user is authenticated he can freely call all protected methods.

推荐答案

我写了一个REST控制器,使你的REST应用程序更容易构建。您可以在阅读所有内容NetTuts:在CodeIgniter中使用RESTful服务

I have written up a REST Controller to make your REST applications easier to build. You can read all about it on NetTuts: Working with RESTful services in CodeIgniter.

这篇关于PHP中的REST认证(CodeIgniter)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆