## Class Auth_OpenID_MemcachedStore

Description

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.

- author: JanRain, Inc. <openid@janrain.com>

Located in /Auth/OpenID/MemcachedStore.php (line 36)

    Auth_OpenID_OpenIDStore
       |
       --Auth_OpenID_MemcachedStore

Method Summary
Auth_OpenID_MemcachedStore Auth_OpenID_MemcachedStore (resource $connection, [ $compress = false])
void associationKey ( $server_url, [ $handle = null])
void associationServerKey ( $server_url)
void getAssociation ( $server_url, [ $handle = null])
void removeAssociation ( $server_url, $handle)
void storeAssociation ( $server_url, $association)
void supportsCleanup ()
void useNonce ( $server_url, $timestamp, $salt)
Methods
Constructor Auth_OpenID_MemcachedStore (line 44)

Initializes a new Auth_OpenID_MemcachedStore instance.

Just saves memcached object as property.

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

- resource $connection: connection Memcache connection resourse
- $compress

associationKey (line 186)

Memcache key is prefixed with 'openid_association_' string.

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

- $server_url
- $handle

associationServerKey (line 194)

Memcache key is prefixed with 'openid_association_' string.

void associationServerKey ( $server_url)

- $server_url

getAssociation (line 91)

Read association from memcached. If no handle given

and multiple associations found, returns latest issued

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

- $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.

removeAssociation (line 125)

Immediately delete association from memcache.

void removeAssociation ( $server_url, $handle)

- $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.

storeAssociation (line 55)

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.

void storeAssociation ( $server_url, $association)

- $server_url
- $association

Redefinition of:

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

supportsCleanup (line 202)

Report that this storage doesn't support cleanup

void supportsCleanup ()

Redefinition of:

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

useNonce (line 165)

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

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

- $server_url
- $timestamp
- $salt

Redefinition of:

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

#### Inherited Methods

Inherited From Auth_OpenID_OpenIDStore

> Auth_OpenID_OpenIDStore::cleanup()
> Auth_OpenID_OpenIDStore::cleanupAssociations()
> Auth_OpenID_OpenIDStore::cleanupNonces()
> Auth_OpenID_OpenIDStore::getAssociation()
> Auth_OpenID_OpenIDStore::removeAssociation()
> Auth_OpenID_OpenIDStore::reset()
> Auth_OpenID_OpenIDStore::storeAssociation()
> Auth_OpenID_OpenIDStore::supportsCleanup()
> Auth_OpenID_OpenIDStore::useNonce()

Documentation generated on Tue, 21 Apr 2009 11:31:31 -0700 by phpDocumentor 1.3.2