diff options
author | Josh Hoyt <josh@janrain.com> | 2006-01-28 00:18:49 +0000 |
---|---|---|
committer | Josh Hoyt <josh@janrain.com> | 2006-01-28 00:18:49 +0000 |
commit | a6e4a1af65b4343218b4e0d54c9d5f1a8831c41f (patch) | |
tree | 72916bd1b3946491a65b03bff83754f62a8b144b | |
parent | cb09e2edac2e181cfda4ef6ed3302b18ec7906b8 (diff) | |
download | php-openid-a6e4a1af65b4343218b4e0d54c9d5f1a8831c41f.zip php-openid-a6e4a1af65b4343218b4e0d54c9d5f1a8831c41f.tar.gz php-openid-a6e4a1af65b4343218b4e0d54c9d5f1a8831c41f.tar.bz2 |
[project @ Documentation and dead-code removal for Association.php]
-rw-r--r-- | Auth/OpenID/Association.php | 37 |
1 files changed, 24 insertions, 13 deletions
diff --git a/Auth/OpenID/Association.php b/Auth/OpenID/Association.php index dbdc8af..d6726da 100644 --- a/Auth/OpenID/Association.php +++ b/Auth/OpenID/Association.php @@ -17,9 +17,15 @@ /** * Includes for utility functions. */ +require_once 'OIDUtil.php'; +/** + * @access private + */ require_once 'CryptUtil.php'; +/** + * @access private + */ require_once 'KVForm.php'; -require_once 'OIDUtil.php'; /** * This class represents an association between a server and a @@ -88,6 +94,10 @@ class Auth_OpenID_Association { /** * This is the standard constructor for creating an association. + * The library should create all of the necessary associations, so + * this constructor is not part of the external API. + * + * @access private * * @param string $handle This is the handle the server gave this * association. @@ -157,18 +167,6 @@ class Auth_OpenID_Association { } /** - * This checks to see if two Auth_OpenID_Association instances - * represent different associations. - * - * @return bool $result true if the two instances represent - * different associations, false otherwise. - */ - function not_equal($other) - { - return !($this->equal($other)); - } - - /** * Convert an association to KV form. * * @return string $result String in KV form suitable for @@ -237,6 +235,7 @@ class Auth_OpenID_Association { /** * Generate a signature for a sequence of (key, value) pairs * + * @access private * @param array $pairs The pairs to sign, in order. This is an * array of two-tuples. * @return string $signature The binary signature of this sequence @@ -251,6 +250,7 @@ class Auth_OpenID_Association { /** * Generate a signature for some fields in a dictionary * + * @access private * @param array $fields The fields to sign, in order; this is an * array of strings. * @param array $data Dictionary of values to sign (an array of @@ -267,6 +267,11 @@ class Auth_OpenID_Association { return base64_encode($this->sign($pairs)); } + /** + * Add a signature to an array of fields + * + * @access private + */ function addSignature($fields, &$data, $prefix = 'openid.') { $sig = $this->signDict($fields, $data, $prefix); @@ -275,6 +280,12 @@ class Auth_OpenID_Association { $data[$prefix . 'signed'] = $signed; } + /** + * Confirm that the signature of these fields matches the + * signature contained in the data + * + * @access private + */ function checkSignature($data, $prefix = 'openid.') { $signed = $data[$prefix . 'signed']; |