Rest认证在PHP(codeIgniter) [英] REST Authentication in PHP (CodeIgniter)

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

问题描述

我写REST API形成我的Web应用程序。应用程序使用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.

有没有code例如如何实现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更容易建立。你可以阅读所有关于它的<一个href=\"http://net.tutsplus.com/tutorials/php/working-with-restful-services-in-$c$cigniter-2/\">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.

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

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