无法获得“Live Delegated Authentication”工作

时间:2009-08-31 12:05:02

标签: php windows

我尝试让Live Delegated Authentication工作以便阅读电子邮件地址。

我在windowslivelogin库的帮助下在PHP中执行此操作。问题是我收到了错误。

我不确定我做错了什么,我在Azure网页上注册了我的应用程序,并将appid和秘密放入代码中。这是我用来初始化Live Library的原因:

$o = new WindowsLiveLogin();
$o->setAppId('000000004801B670');
$o->setSecret('secret');
$o->setSecurityAlgorithm('wsignin1.0');
$o->setDebug(true);
$o->setPolicyUrl('http://www.google.com/aides.html');
$o->setReturnUrl("http://michaelp.dev.gamepoint.net/framework/mainsite/contactimporter/?service=live");
return $o;

然后我打电话给$ this-> LiveLibrary-> getLoginUrl()
在我登录Live之后,它发布了2件事,$ _POST ['stoken']和$ _POST ['action']。 只要我打电话给$ this-> LiveLibrary-> processLogin($ _ REQUEST);它失败并返回令牌无效的错误。

我尝试通过重定向直接获得同意 $这 - > LiveLibrary-> getConsentUrl( “Contacts.View”);

但这会产生3007错误,并表示无法分享信息

According to MS this means the following : 

3007


Consent Service API failed in the <method name> method. The application verifier is invalid.


The offer security level requires that a valid application verifier be passed with the request.

我使用由库生成的以下URL

  

https://consent.live.com/Delegation.aspx?ps=Contacts.Invite&ru=http%3A%2F%2Fmichaelp.dev.gamepoint.net%2Fframework%2Fmainsite%2Fcontactimporter%2F%3Fservice%3Dlive&pl=http%3A%2F%2Fwww.google.com%2Faides.html&app=appid%3D000000004801B670%26ts%3D1251722931%26sig%3DD2gkM%252F%252FwlRXXfS64NMrV%252Bkt50v6dAOcESblfRk7j%252FUE%253D

我不理解微软在这件事上的大部分文档,我认为它真的不清楚和混乱。我试过的样本也不起作用。我收到一条错误消息,它无法验证/解码令牌。当我尝试processLogin()时,我得到了同样的结果。

先谢谢,

迈克尔

0 个答案:

没有答案