tags:

views:

73

answers:

0

Hi,

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

Iam doing this in PHP with the help of the windowslivelogin library. The problem is that i get an error.

I'm not sure what i'm doing wrong, i registered my application on the Azure webpage and got the appid and the secret into the 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 Login in to Live, it posts 2 things back, $_POST['stoken'] and $_POST['action']. As soon as i call $this->LiveLibrary->processLogin($_REQUEST); it fails and gives back an error that the token is invalid.

I tried getting Consent straight away by making redirecting to $this->LiveLibrary->getConsentUrl("Contacts.View");

but that gives an 3007 error and says that it cant share the 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&amp;ru=http%3A%2F%2Fmichaelp.dev.gamepoint.net%2Fframework%2Fmainsite%2Fcontactimporter%2F%3Fservice%3Dlive&amp;pl=http%3A%2F%2Fwww.google.com%2Faides.html&amp;app=appid%3D000000004801B670%26ts%3D1251722931%26sig%3DD2gkM%252F%252FwlRXXfS64NMrV%252Bkt50v6dAOcESblfRk7j%252FUE%253D

I dont understand most of the documentation Microsoft has on this thing, i think its really unclear and chaotic. Also the Sample i tried doesn't work. I get an error message, it cant validate/decode the token. Same i get when i try the processLogin().

Thanks in Advance,

Michael