Can't get "Live Delegated Authentication" to work

I am trying to get Live Delegated Authentication to work for the purpose of reading email addresses.

I am doing this in PHP using the windowslivelogin library. The problem is I am getting the error.

I'm not sure what I am doing wrong, I registered my app with the Azure webpage and got the app and secret in code. This is what I use to initialize the 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;

      

then i call $ this-> LiveLibrary-> getLoginUrl ()
And after i log into Live it will send 2 things back, $ _POST ['stoken'] and $ _POST ['action']. As soon as I call $ this-> LiveLibrary-> processLogin ($ _ REQUEST); it fails and returns an error that the token is not valid.

I tried to get consent right away by doing a redirect to $ This-> LiveLibrary-> getConsentUrl ("Contacts.View");

but this gives error 3007 and says she cannot share information

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.

      

Iam using the following url generated by the library

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% 252Bkt50v6dAOcESblfRk7UE% 25D2

I don't understand most of the Microsoft documentation on this, I think it's really obscure and chaotic. Also the example I tried doesn't work. I am getting an error, it cannot validate / decode the token. This is the same way I get when I try processLogin ().

Thanks Advance,

Michael

+2


source to share





All Articles