function _openid_response

7.x openid.inc _openid_response($str = NULL)
6.x openid.inc _openid_response($str = NULL)
1 call to _openid_response()
openid_complete in drupal-6.x/modules/openid/openid.module
Completes OpenID authentication by validating returned data from the OpenID Provider.

File

drupal-6.x/modules/openid/openid.inc, line 376
OpenID utility functions.

Code

function _openid_response($str = NULL) {
  $data = array();

  if (isset($_SERVER['REQUEST_METHOD'])) {
    $data = _openid_get_params($_SERVER['QUERY_STRING']);

    if ($_SERVER['REQUEST_METHOD'] == 'POST') {
      $str = file_get_contents('php://input');

      $post = array();
      if ($str !== false) {
        $post = _openid_get_params($str);
      }

      $data = array_merge($data, $post);
    }
  }

  return $data;
}