简体   繁体   English

如何使用PECL OAuthProvider验证PHP中的OAuth签名?

[英]What should I do to verify an OAuth signature in PHP with PECL OAuthProvider?

I'm trying to verify an OAuth signature in PHP with PECL OAuthProvider. 我正在尝试使用PECL OAuthProvider验证PHP中的OAuth签名。 But almost its functions is not documented. 但是几乎没有记录其功能。 ex) http://www.php.net/manual/en/oauthprovider.setparam.php 例如) http://www.php.net/manual/en/oauthprovider.setparam.php

What should I do? 我该怎么办? Is there unofficial document or sample code for PECL OAuthProvider? 是否有PECL OAuthProvider的非正式文件或示例代码?

I have been trying to do the same for a while now and have found the lack of documentation very frustrating. 我已经尝试了一段时间,但发现缺少文档非常令人沮丧。

These documents have helped me a lot and may be of some use to you as well. 这些文件对我帮助很大,也许对您也有帮助。

https://toys.lerdorf.com/archives/55-Writing-an-OAuth-Provider-Service.html http://www.lornajane.net/posts/2011/php-oauth-provider-request-tokens https://toys.lerdorf.com/archives/55-Writing-an-OAuth-Provider-Service.html http://www.lornajane.net/posts/2011/php-oauth-provider-request-tokens

I believe what you are looking for is OAuthProvider::checkOAuthRequest() 我相信您正在寻找的是OAuthProvider :: checkOAuthRequest()

Those and constantly looking through http://oauth.net/core/1.0a/ to gain more insight on OAuth. 这些人员不断浏览http://oauth.net/core/1.0a/以获得关于OAuth的更多见解。

Hope this helps. 希望这可以帮助。

The OAuth for everything is similar, but not the same. 一切的OAuth都是相似的,但并不相同。 You should look up the OAuth instructions from wherever you are getting the tokens and what not from (ie if you're checking Gmail through your app, you should check the Google OAuth) 无论您从何处获取令牌,都应查找OAuth指示,而不是从任何地方查找OAuth指示(即,如果您通过应用检查Gmail,则应检查Google OAuth)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM