_openid_create_message

Versions
6 – 7
_openid_create_message($data)

Create a serialized message packet as per spec: $key:$value\n .

▾ 3 functions call _openid_create_message()

openid_association in modules/openid/openid.module
Attempt to create a shared secret with the OpenID Provider.
openid_verify_assertion in modules/openid/openid.module
Attempt to verify the response received from the OpenID Provider.
_openid_signature in modules/openid/openid.inc
Sign certain keys in a message

Code

modules/openid/openid.inc, line 127

<?php
function _openid_create_message($data) {
  $serialized = '';

  foreach ($data as $key => $value) {
    if ((strpos($key, ':') !== FALSE) || (strpos($key, "\n") !== FALSE) || (strpos($value, "\n") !== FALSE)) {
      return null;
    }
    $serialized .= "$key:$value\n";
  }
  return $serialized;
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.