You are here

function openid_association_request in Drupal 6

Same name and namespace in other branches
  1. 7 modules/openid/openid.module \openid_association_request()
1 call to openid_association_request()
openid_association in modules/openid/openid.module
Attempt to create a shared secret with the OpenID Provider.

File

modules/openid/openid.module, line 507
Implement OpenID Relying Party support for Drupal

Code

function openid_association_request($public) {
  module_load_include('inc', 'openid');
  $request = array(
    'openid.ns' => OPENID_NS_2_0,
    'openid.mode' => 'associate',
    'openid.session_type' => 'DH-SHA1',
    'openid.assoc_type' => 'HMAC-SHA1',
  );
  if ($request['openid.session_type'] == 'DH-SHA1' || $request['openid.session_type'] == 'DH-SHA256') {
    $cpub = _openid_dh_long_to_base64($public);
    $request['openid.dh_consumer_public'] = $cpub;
  }
  return $request;
}