Class Auth_OpenID_MemcachedStore
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.
-
Auth_OpenID_OpenIDStore
-
Auth_OpenID_MemcachedStore
Methods summary
public
|
|
public
|
#
storeAssociation( string $server_url, Association $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.
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
The URL of the identity server that
this association is with. Because of the way the server portion
of the library uses this interface, don't assume there are any
limitations on the character set of the input string. In
particular, expect to see unescaped non-url-safe characters in
the server_url field.
- $association
- The Association to store.
Overrides
|
public
Association
|
#
getAssociation( string $server_url, mixed $handle = null )
Read association from memcached. If no handle given
and multiple associations found, returns latest issued
Read association from memcached. If no handle given
and multiple associations found, returns latest issued
Parameters
- $server_url
The URL of the identity server to get
the association for. Because of the way the server portion of
the library uses this interface, don't assume there are any
limitations on the character set of the input string. In
particular, expect to see unescaped non-url-safe characters in
the server_url field.
- $handle
This optional parameter is the handle of
the specific association to get. If no specific handle is
provided, any valid association matching the server URL is
returned.
Returns
Association The Association for the given identity
server.
Overrides
|
public
mixed
|
#
removeAssociation( string $server_url, string $handle )
Immediately delete association from memcache.
Immediately delete association from memcache.
Parameters
- $server_url
The URL of the identity server the
association to remove belongs to. Because of the way the server
portion of the library uses this interface, don't assume there
are any limitations on the character set of the input
string. In particular, expect to see unescaped non-url-safe
characters in the server_url field.
- $handle
This is the handle of the association to
remove. If there isn't an association found that matches both
the given URL and handle, then there was no matching handle
found.
Returns
mixed Returns whether or not the given association existed.
Overrides
|
public
boolean
|
#
useNonce( string $server_url, $timestamp, $salt )
Create nonce for server and salt, expiring after
$Auth_OpenID_SKEW seconds.
Create nonce for server and salt, expiring after
$Auth_OpenID_SKEW seconds.
Parameters
- $server_url
- $nonce The nonce to use.
- $timestamp
- $salt
Returns
boolean Whether or not the nonce was valid.
Overrides
|
public
|
#
associationKey( $server_url, $handle = null )
Memcache key is prefixed with 'openid_association_' string.
Memcache key is prefixed with 'openid_association_' string.
|
public
|
#
associationServerKey( $server_url )
Memcache key is prefixed with 'openid_association_' string.
Memcache key is prefixed with 'openid_association_' string.
|
public
|
#
supportsCleanup( )
Report that this storage doesn't support cleanup
Report that this storage doesn't support cleanup
Overrides
|