function openid_authentication_request in Drupal 6
Same name and namespace in other branches
- 7 modules/openid/openid.module \openid_authentication_request()
1 call to openid_authentication_request()
- openid_begin in modules/
openid/ openid.module - The initial step of OpenID authentication responsible for the following:
File
- modules/
openid/ openid.module, line 525 - Implement OpenID Relying Party support for Drupal
Code
function openid_authentication_request($claimed_id, $identity, $return_to = '', $assoc_handle = '', $version = 2) {
global $base_url;
module_load_include('inc', 'openid');
$ns = $version == 2 ? OPENID_NS_2_0 : OPENID_NS_1_0;
$request = array(
'openid.ns' => $ns,
'openid.mode' => 'checkid_setup',
'openid.identity' => $identity,
'openid.claimed_id' => $claimed_id,
'openid.assoc_handle' => $assoc_handle,
'openid.return_to' => $return_to,
);
if ($version == 2) {
$request['openid.realm'] = $base_url . '/';
}
else {
$request['openid.trust_root'] = $base_url . '/';
}
// Simple Registration
$request['openid.sreg.required'] = 'nickname,email';
$request['openid.ns.sreg'] = "http://openid.net/extensions/sreg/1.1";
$request = array_merge($request, module_invoke_all('openid', 'request', $request));
return $request;
}