diff options
Diffstat (limited to 'extlib/Auth/OpenID/Association.php')
-rw-r--r-- | extlib/Auth/OpenID/Association.php | 23 |
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 |