function openid_association_request

7.x openid.module openid_association_request($public)
6.x openid.module openid_association_request($public)
1 call to openid_association_request()
openid_association in drupal-7.x/modules/openid/openid.module
Attempt to create a shared secret with the OpenID Provider.

File

drupal-7.x/modules/openid/openid.module, line 722
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;
}