PHP Class Auth_OpenID_MemcachedStore

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.
Inheritance: extends Auth_OpenID_OpenIDStore
Mostrar archivo Open project: openid/php-openid

Public Methods

Method Description
__construct ( $connection, $compress = false ) Initializes a new {@link Auth_OpenID_MemcachedStore} instance.
associationKey ( $server_url, $handle = null ) Memcache key is prefixed with 'openid_association_' string.
associationServerKey ( $server_url ) Memcache key is prefixed with 'openid_association_' string.
getAssociation ( $server_url, $handle = null ) Read association from memcached. If no handle given and multiple associations found, returns latest issued
removeAssociation ( $server_url, $handle ) Immediately delete association from memcache.
storeAssociation ( $server_url, $association ) Store association until its expiration time in memcached.
supportsCleanup ( ) Report that this storage doesn't support cleanup
useNonce ( $server_url, $timestamp, $salt ) Create nonce for server and salt, expiring after $Auth_OpenID_SKEW seconds.

Method Details

__construct() public method

Just saves memcached object as property.
public __construct ( $connection, $compress = false )

associationKey() public method

Memcache key is prefixed with 'openid_association_' string.
public associationKey ( $server_url, $handle = null )

associationServerKey() public method

Memcache key is prefixed with 'openid_association_' string.
public associationServerKey ( $server_url )

getAssociation() public method

Read association from memcached. If no handle given and multiple associations found, returns latest issued
public getAssociation ( $server_url, $handle = null )

removeAssociation() public method

Immediately delete association from memcache.
public removeAssociation ( $server_url, $handle )

storeAssociation() public method

Overwrites any existing association with same server_url and handle. Handles list of associations for every server.
public storeAssociation ( $server_url, $association )

supportsCleanup() public method

Report that this storage doesn't support cleanup
public supportsCleanup ( )

useNonce() public method

Create nonce for server and salt, expiring after $Auth_OpenID_SKEW seconds.
public useNonce ( $server_url, $timestamp, $salt )