DO NOT EDIT THE CONTENT OF THIS PAGE DIRECTLY (EXCEPT INSIDE THE DIV BELOW WITH ID=DESCRIPTION), UNLESS YOU KNOW WHAT YOU'RE DOING.
THE STRUCTURE OF THE CONTENT IS VITAL IN BEING ABLE TO AUTO UPDATE THE CONTENT THROUGH THE DOC GENERATOR.



Method Summary
void
addAttributeRequest(alias, schemaURI, required)
Add attribute request
void
execute()



Method Details

addAttributeRequest

void
addAttributeRequest
(alias, schemaURI, required)
Add attribute request

Parameters

{String} alias
{String} schemaURI
{Boolean} required

Returns

void

Sample

authenticateRequest.addAttributeRequest('email','http://axschema.org/contact/email',true);
 

execute

void
execute
()

Returns

void

Sample

var authenticateRequest = plugins.openid.createAuthenticateRequest('https://www.google.com/accounts/o8/id',openIDLoginCallback);
authenticateRequest.addAttributeRequest('email','http://axschema.org/contact/email',true);
//see http://www.axschema.org/types/ for more attributes, not all are supported by all providers!
authenticateRequest.execute();

//sample
//function openIDLoginCallback(identifier,authenticateResult)
//{
//	var ok = false;
//	if (identifier)
//	{
//		var id = identifier.substring(identifier.lastIndexOf('=')+1)
//		application.output('id:'+id)
//		var email = authenticateResult.getAttributeValue('email')
//		application.output('email:'+email)
//		ok = security.login(email, id, ['Administrators'])
//	}
//	if (!ok)
//	{
//		application.output('Login failed')
//	}
//}