OpenID with Yahoo, Callback not getting the parameters

Questions and answers on designing your Servoy solutions, database modelling and other 'how do I do this' that don't fit in any of the other categories

OpenID with Yahoo, Callback not getting the parameters

Postby sovanm » Wed Aug 19, 2015 6:39 am

Hi All,

I am trying to integrate OpenID into servoy with Yahoo. I was getting redirected to yahoo site for authentication and getting the message that you are sharing username and email. But in callback method I am getting NULL identifier and authenticationResult.

What I have done so far :

On a button click on login page.

Code: Select all
var authenticateRequest = plugins.openid.createAuthenticateRequest('https://me.yahoo.com/<myidentifier>', openIDLoginCallback);
   authenticateRequest.addAttributeRequest('name', 'http://axschema.org/namePerson', true);
   authenticateRequest.addAttributeRequest('email', 'http://axschema.org/contact/email', true);
   
   authenticateRequest.execute();


Then defined the callback method as :

Code: Select all
/**
* @param {plugins.openid.JSAuthenticateResult} identifier
* @param {plugins.openid.JSAuthenticateResult} authenticateResult
*
* @properties={typeid:24,uuid:"4898C7A5-AB14-4041-9B60-07DBE9F205D6"}
*/
function openIDLoginCallback(identifier, authenticateResult) {

// identifier --> null,
// authenticateResult --> null.

   var name = authenticateResult.getAttributeValue('name');
   security.authenticate(authModule, 'open_id_test', [name]);
}


Here I am getting null for identifier and authenticationResult and the following error.

Code: Select all
Failed to execute the method of context login and name openIDLoginCallback on the solution mod_security_login
TypeError: Cannot call method "getAttributeValue" of undefined (D:\Projects\PM\Workspace\mod_security_login\forms\login.js#492)
   at D:\Projects\PM\Workspace\mod_security_login\forms\login.js:492 (openIDLoginCallback)

Am I missing anything here?
Please suggest

Sovan
sovanm
 
Posts: 99
Joined: Fri Oct 28, 2011 1:55 pm
Location: Bhubaneswar, India

Return to Programming with Servoy

Who is online

Users browsing this forum: No registered users and 14 guests

cron