Zend Framework 2中的OAuth [英] OAuth in Zend Framework 2

查看:90
本文介绍了Zend Framework 2中的OAuth的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在基于新版本2.0.2开发我的第一个ZF应用程序. (我没有ZF1的经验)

现在我需要使用OAuth进行身份验证,并且我想知道ZF2是否已经实现.我知道有一个ZF1模块.

如果没有,您会推荐什么.使用PHP的本机OAuth支持吗?

感谢您的帮助! 罗伯托

解决方案

已经有针对ZF2的官方OAuth软件包.您可以在 ZF2软件包网站上找到一些信息.

如果您使用composer,则可以按照设置composer的说明添加以下内容来安装软件包:此处.

对于require软件包,只需输入:

"require": {
    "zendframework/zendoauth": "2.0.*"
},

然后运行:

php composer.phar install

,它将安装oauth软件包.

还有一个看起来不错的 ReverseOAuth2 库.我发现在社区支持的网站上 modules.zendframework.com .

如果要直接下载,可以在撰写本文时找到稳定的版本: 解决方案

There is an official OAuth package for ZF2 already. You can find some information on the ZF2 Packages website.

If you use composer you can install the package by adding the following following the directions on setting up composer here.

For the require packages, just put:

"require": {
    "zendframework/zendoauth": "2.0.*"
},

and then run:

php composer.phar install

and it will install the oauth package.

There is also the ReverseOAuth2 library which looks good. I found that on the community supported site modules.zendframework.com.

If you want to download directly, the stable version at the time of writing can be found at: https://packages.zendframework.com/composer/zendframework-zendoauth-2.0.2-release-2.0.2-91b73f.zip

Hope that helps.

这篇关于Zend Framework 2中的OAuth的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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