[ class tree: OpenID ] [ index: OpenID ] [ all elements ]

Class: Auth_OpenID_MemcachedStore

Source Location: /zp-extensions/federated_logon/Auth/OpenID/MemcachedStore.php

Class Auth_OpenID_MemcachedStore

Class Overview

This is a memcached-based store for OpenID associations and nonces.

As memcache has limit of 250 chars for key length, server_url, handle and salt are hashed with sha1().

Most of the methods of this class are implementation details. People wishing to just use this store need only pay attention to the constructor.

Located in /zp-extensions/federated_logon/Auth/OpenID/MemcachedStore.php [line 36]

Auth_OpenID_OpenIDStore
   |
   --Auth_OpenID_MemcachedStore
Author(s): Information Tags:

Methods

[ Top ]
Inherited Properties, Constants, and Methods
Inherited Properties Inherited Methods Inherited Constants

Inherited From Auth_OpenID_OpenIDStore

Auth_OpenID_OpenIDStore::cleanup()
Auth_OpenID_OpenIDStore::cleanupAssociations()
Auth_OpenID_OpenIDStore::cleanupNonces()
Auth_OpenID_OpenIDStore::getAssociation()
This method returns an Association object from storage that matches the server URL and, if specified, handle. It returns null if no such association is found or if the matching association is expired.
Auth_OpenID_OpenIDStore::removeAssociation()
This method removes the matching association if it's found, and returns whether the association was removed or not.
Auth_OpenID_OpenIDStore::reset()
Removes all entries from the store; implementation is optional.
Auth_OpenID_OpenIDStore::storeAssociation()
This method puts an Association object into storage, retrievable by server URL and handle.
Auth_OpenID_OpenIDStore::supportsCleanup()
Report whether this storage supports cleanup
Auth_OpenID_OpenIDStore::useNonce()
Called when using a nonce.

[ Top ]
Method Summary
Auth_OpenID_MemcachedStore   Auth_OpenID_MemcachedStore()   Initializes a new Auth_OpenID_MemcachedStore instance.
void   associationKey()   Memcache key is prefixed with 'openid_association_' string.
void   associationServerKey()   Memcache key is prefixed with 'openid_association_' string.
void   getAssociation()   Read association from memcached. If no handle given
void   removeAssociation()   Immediately delete association from memcache.
void   storeAssociation()   Store association until its expiration time in memcached.
void   supportsCleanup()   Report that this storage doesn't support cleanup
void   useNonce()   Create nonce for server and salt, expiring after $Auth_OpenID_SKEW seconds.

[ Top ]
Methods
Constructor Auth_OpenID_MemcachedStore  [line 44]

  Auth_OpenID_MemcachedStore Auth_OpenID_MemcachedStore( resource $connection, [ $compress = false]  )

Initializes a new Auth_OpenID_MemcachedStore instance.

Just saves memcached object as property.

Parameters:
resource   $connection:  connection Memcache connection resourse
   $compress: 


[ Top ]
associationKey  [line 186]

  void associationKey( $server_url, [ $handle = null]  )

Memcache key is prefixed with 'openid_association_' string.

Parameters:
   $server_url: 
   $handle: 


[ Top ]
associationServerKey  [line 194]

  void associationServerKey( $server_url  )

Memcache key is prefixed with 'openid_association_' string.

Parameters:
   $server_url: 


[ Top ]
getAssociation  [line 91]

  void getAssociation( $server_url, [ $handle = null]  )

Read association from memcached. If no handle given

and multiple associations found, returns latest issued

Parameters:
   $server_url: 
   $handle: 


Redefinition of:
Auth_OpenID_OpenIDStore::getAssociation()
This method returns an Association object from storage that matches the server URL and, if specified, handle. It returns null if no such association is found or if the matching association is expired.

[ Top ]
removeAssociation  [line 125]

  void removeAssociation( $server_url, $handle  )

Immediately delete association from memcache.

Parameters:
   $server_url: 
   $handle: 


Redefinition of:
Auth_OpenID_OpenIDStore::removeAssociation()
This method removes the matching association if it's found, and returns whether the association was removed or not.

[ Top ]
storeAssociation  [line 55]

  void storeAssociation( $server_url, $association  )

Store association until its expiration time in memcached.

Overwrites any existing association with same server_url and handle. Handles list of associations for every server.

Parameters:
   $server_url: 
   $association: 


Redefinition of:
Auth_OpenID_OpenIDStore::storeAssociation()
This method puts an Association object into storage, retrievable by server URL and handle.

[ Top ]
supportsCleanup  [line 202]

  void supportsCleanup( )

Report that this storage doesn't support cleanup



Redefinition of:
Auth_OpenID_OpenIDStore::supportsCleanup()
Report whether this storage supports cleanup

[ Top ]
useNonce  [line 165]

  void useNonce( $server_url, $timestamp, $salt  )

Create nonce for server and salt, expiring after $Auth_OpenID_SKEW seconds.

Parameters:
   $server_url: 
   $timestamp: 
   $salt: 


Redefinition of:
Auth_OpenID_OpenIDStore::useNonce()
Called when using a nonce.

[ Top ]

Documentation generated on Tue, 20 Dec 2011 16:07:41 +0100 by phpDocumentor 1.4.3