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