ILIAS
Release_5_0_x_branch Revision 61816
|
Public Member Functions | |
Auth_OpenID_Association ($handle, $secret, $issued, $lifetime, $assoc_type) | |
This is the standard constructor for creating an association. | |
getExpiresIn ($now=null) | |
This returns the number of seconds this association is still valid for, or 0 if the association is no longer valid. | |
equal ($other) | |
This checks to see if two Auth_OpenID_Association instances represent the same association. | |
serialize () | |
Convert an association to KV form. | |
sign ($pairs) | |
Generate a signature for a sequence of (key, value) pairs. | |
signMessage ($message) | |
Generate a signature for some fields in a dictionary. | |
_makePairs ($message) | |
Given a Auth_OpenID_Message, return the key/value pairs to be signed according to the signed list in the message. | |
getMessageSignature ($message) | |
Given an Auth_OpenID_Message, return the signature for the signed list in the message. | |
checkMessageSignature ($message) | |
Confirm that the signature of these fields matches the signature contained in the data. |
Static Public Member Functions | |
static | fromExpiresIn ($expires_in, $handle, $secret, $assoc_type) |
This is an alternate constructor (factory method) used by the OpenID consumer library to create associations. | |
static | deserialize ($class_name, $assoc_s) |
Parse an association as stored by serialize(). |
Data Fields | |
$SIG_LENGTH = 20 | |
This is a HMAC-SHA1 specific value. | |
$assoc_keys | |
The ordering and name of keys as stored by serialize. | |
$_macs |
Definition at line 44 of file Association.php.
Auth_OpenID_Association::_makePairs | ( | $message | ) |
Given a Auth_OpenID_Message, return the key/value pairs to be signed according to the signed list in the message.
If the message lacks a signed list, return null.
private
Definition at line 330 of file Association.php.
References Auth_OpenID\arrayGet(), Auth_OpenID_OPENID_NS, and Auth_OpenID\isFailure().
Referenced by getMessageSignature().
Auth_OpenID_Association::Auth_OpenID_Association | ( | $handle, | |
$secret, | |||
$issued, | |||
$lifetime, | |||
$assoc_type | |||
) |
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.
private
string | $handle | This is the handle the server gave this association. |
string | $secret | This is the shared secret the server generated for this association. |
integer | $issued | This is the time this association was issued, in seconds since 00:00 GMT, January 1, 1970. (ie, a unix timestamp) |
integer | $lifetime | This is the amount of time this association is good for, measured in seconds since the association was issued. |
string | $assoc_type | This is the type of association this instance represents. The only valid values of this field at this time is 'HMAC-SHA1' and 'HMAC-SHA256', but new types may be defined in the future. |
Definition at line 131 of file Association.php.
References Auth_OpenID_getSupportedAssociationTypes().
Referenced by fromExpiresIn().
Auth_OpenID_Association::checkMessageSignature | ( | $message | ) |
Confirm that the signature of these fields matches the signature contained in the data.
private
Definition at line 367 of file Association.php.
References Auth_OpenID_OPENID_NS, getMessageSignature(), and Auth_OpenID\isFailure().
|
static |
Parse an association as stored by serialize().
This is the inverse of serialize.
string | $assoc_s | Association as serialized by serialize() |
Definition at line 209 of file Association.php.
References Auth_OpenID_KVForm\toArray().
Referenced by Auth_OpenID_FileStore\_allAssocs(), and Auth_OpenID_FileStore\_getAssociation().
Auth_OpenID_Association::equal | ( | $other | ) |
This checks to see if two Auth_OpenID_Association instances represent the same association.
Definition at line 170 of file Association.php.
|
static |
This is an alternate constructor (factory method) used by the OpenID consumer library to create associations.
OpenID store implementations shouldn't use this constructor.
private
integer | $expires_in | This is the amount of time this association is good for, measured in seconds since the association was issued. |
string | $handle | This is the handle the server gave this association. |
string | secret This is the shared secret the server generated for this association. | |
assoc_type | This is the type of association this instance represents. The only valid values of this field at this time is 'HMAC-SHA1' and 'HMAC-SHA256', but new types may be defined in the future. |
Definition at line 97 of file Association.php.
References Auth_OpenID_Association().
Referenced by Auth_OpenID_GenericConsumer\_extractAssociation(), and Auth_OpenID_Signatory\createAssociation().
Auth_OpenID_Association::getExpiresIn | ( | $now = null | ) |
This returns the number of seconds this association is still valid for, or 0 if the association is no longer valid.
Definition at line 154 of file Association.php.
Auth_OpenID_Association::getMessageSignature | ( | $message | ) |
Given an Auth_OpenID_Message, return the signature for the signed list in the message.
private
Definition at line 355 of file Association.php.
References _makePairs(), and sign().
Referenced by checkMessageSignature(), and signMessage().
Auth_OpenID_Association::serialize | ( | ) |
Convert an association to KV form.
Definition at line 186 of file Association.php.
References Auth_OpenID_KVForm\fromArray().
Auth_OpenID_Association::sign | ( | $pairs | ) |
Generate a signature for a sequence of (key, value) pairs.
private
array | $pairs | The pairs to sign, in order. This is an array of two-tuples. |
Definition at line 263 of file Association.php.
References Auth_OpenID_KVForm\fromArray().
Referenced by getMessageSignature().
Auth_OpenID_Association::signMessage | ( | $message | ) |
Generate a signature for some fields in a dictionary.
private
array | $fields | The fields to sign, in order; this is an array of strings. |
array | $data | Dictionary of values to sign (an array of string => string pairs). |
Definition at line 283 of file Association.php.
References Auth_OpenID_OPENID_NS, and getMessageSignature().
Auth_OpenID_Association::$_macs |
Definition at line 67 of file Association.php.
Auth_OpenID_Association::$assoc_keys |
The ordering and name of keys as stored by serialize.
private
Definition at line 58 of file Association.php.
Auth_OpenID_Association::$SIG_LENGTH = 20 |