summaryrefslogtreecommitdiff
path: root/extlib/Auth/OpenID/Association.php
diff options
context:
space:
mode:
authorBrion Vibber <brion@pobox.com>2010-06-29 10:24:48 -0400
committerBrion Vibber <brion@pobox.com>2010-06-29 10:24:48 -0400
commit2d920e05d563c9c327cf235b31ce18dfc4a83870 (patch)
tree31f3cde800220484cd242a8c4138c166307a2dea /extlib/Auth/OpenID/Association.php
parent923d9ef71ce49bfa55460bf42acb8a35bf3e84be (diff)
Update the (formerly) Janrain OpenID library to 2.2.2 -- bug fixes including PHP 5.3 compatibility fix.
Upstream release was tagged at: http://github.com/openid/php-openid/commit/a287b2d85e753c84b3b883ed8ee3ffe8692c8477
Diffstat (limited to 'extlib/Auth/OpenID/Association.php')
-rw-r--r--extlib/Auth/OpenID/Association.php23
1 files changed, 10 insertions, 13 deletions
diff --git a/extlib/Auth/OpenID/Association.php b/extlib/Auth/OpenID/Association.php
index 37ce0cbf4..d1ac1ed9b 100644
--- a/extlib/Auth/OpenID/Association.php
+++ b/extlib/Auth/OpenID/Association.php
@@ -94,7 +94,7 @@ class Auth_OpenID_Association {
* @return association An {@link Auth_OpenID_Association}
* instance.
*/
- function fromExpiresIn($expires_in, $handle, $secret, $assoc_type)
+ static function fromExpiresIn($expires_in, $handle, $secret, $assoc_type)
{
$issued = time();
$lifetime = $expires_in;
@@ -132,7 +132,7 @@ class Auth_OpenID_Association {
$handle, $secret, $issued, $lifetime, $assoc_type)
{
if (!in_array($assoc_type,
- Auth_OpenID_getSupportedAssociationTypes())) {
+ Auth_OpenID_getSupportedAssociationTypes(), true)) {
$fmt = 'Unsupported association type (%s)';
trigger_error(sprintf($fmt, $assoc_type), E_USER_ERROR);
}
@@ -206,7 +206,7 @@ class Auth_OpenID_Association {
* @param string $assoc_s Association as serialized by serialize()
* @return Auth_OpenID_Association $result instance of this class
*/
- function deserialize($class_name, $assoc_s)
+ static function deserialize($class_name, $assoc_s)
{
$pairs = Auth_OpenID_KVForm::toArray($assoc_s, $strict = true);
$keys = array();
@@ -327,7 +327,7 @@ class Auth_OpenID_Association {
*
* @access private
*/
- function _makePairs(&$message)
+ function _makePairs($message)
{
$signed = $message->getArg(Auth_OpenID_OPENID_NS, 'signed');
if (!$signed || Auth_OpenID::isFailure($signed)) {
@@ -352,7 +352,7 @@ class Auth_OpenID_Association {
*
* @access private
*/
- function getMessageSignature(&$message)
+ function getMessageSignature($message)
{
$pairs = $this->_makePairs($message);
return base64_encode($this->sign($pairs));
@@ -364,7 +364,7 @@ class Auth_OpenID_Association {
*
* @access private
*/
- function checkMessageSignature(&$message)
+ function checkMessageSignature($message)
{
$sig = $message->getArg(Auth_OpenID_OPENID_NS,
'sig');
@@ -469,18 +469,16 @@ function Auth_OpenID_getOnlyEncryptedOrder()
return $result;
}
-function &Auth_OpenID_getDefaultNegotiator()
+function Auth_OpenID_getDefaultNegotiator()
{
- $x = new Auth_OpenID_SessionNegotiator(
+ return new Auth_OpenID_SessionNegotiator(
Auth_OpenID_getDefaultAssociationOrder());
- return $x;
}
-function &Auth_OpenID_getEncryptedNegotiator()
+function Auth_OpenID_getEncryptedNegotiator()
{
- $x = new Auth_OpenID_SessionNegotiator(
+ return new Auth_OpenID_SessionNegotiator(
Auth_OpenID_getOnlyEncryptedOrder());
- return $x;
}
/**
@@ -610,4 +608,3 @@ class Auth_OpenID_SessionNegotiator {
}
}
-?> \ No newline at end of file