openid_authentication_request

Хочешь помочь с переводом? Это очень просто и быстро. Лишь зарегистрируйся, и можешь тут же начать переводить.

modules/openid/openid.module, строка 451

Версии
6
openid_authentication_request($claimed_id, $identity, $return_to = '', $assoc_handle = '', $version = 2)

▾ 1 функция вызывает openid_authentication_request()

openid_begin in modules/openid/openid.module
The initial step of OpenID authentication responsible for the following: Perform discovery on the claimed OpenID. If possible, create an association with the Provider's endpoint. Create the authentication request. Perform the appropriate redirect.

Код

<?php
function openid_authentication_request($claimed_id, $identity, $return_to = '', $assoc_handle = '', $version = 2) {
  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'] = url('', array('absolute' => TRUE));
  }
  else {
    $request['openid.trust_root'] = url('', array('absolute' => TRUE));
  }

  // 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;
}
?>
Войдите или зарегистрируйтесь, чтобы получить возможность отправлять комментарии

Вход в систему