OAuth in Zend Framework 2

痴心易碎 提交于 2019-11-30 14:59:06

问题


I am currently developing my first ZF application based on the new release 2.0.2. (I don't have any experience in ZF1)

Now I need to use OAuth to authenticate and I wonder if there's already an implementation for ZF2. I know there's a ZF1 module.

If there isn't, what would you recommend. Use PHP's native OAuth support?

Thanks for your help! Roberto


回答1:


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.



来源:https://stackoverflow.com/questions/12942503/oauth-in-zend-framework-2

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!