PHP Class Auth_OpenID_PredisStore

Uses Predis library {@see https://github.com/nrk/predis}. Requires PHP >= 5.3.
Inheritance: extends Auth_OpenID_OpenIDStore
Mostrar archivo Open project: openid/php-openid

Protected Properties

Property Type Description
$prefix string Prefix for Redis keys
$redis Predis\Client

Public Methods

Method Description
__construct ( Client $redis, string $prefix = '' ) Initializes a new {@link Auth_OpenID_PredisStore} instance.
associationKey ( $server_url, $handle = null ) Key is prefixed with $prefix and 'openid_association_' string
associationServerKey ( $server_url ) Key is prefixed with $prefix and 'openid_association_server_' string
getAssociation ( $server_url, $handle = null ) Read association from Redis. If no handle given and multiple associations found, returns latest issued
removeAssociation ( $server_url, $handle ) Immediately delete association from Redis.
storeAssociation ( $server_url, $association ) Store association until its expiration time in Redis server.
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.

Private Methods

Method Description
getAssociationFromServer ( $associationKey ) Function to actually receive and unserialize the association from the server.
nonceKey ( $server_url, $salt ) Build up nonce key

Method Details

__construct() public method

Initializes a new {@link Auth_OpenID_PredisStore} instance.
public __construct ( Client $redis, string $prefix = '' )
$redis Predis\Client Predis client object
$prefix string Prefix for all keys stored to the Redis

associationKey() public method

Key is prefixed with $prefix and 'openid_association_' string
public associationKey ( $server_url, $handle = null )

associationServerKey() public method

Key is prefixed with $prefix and 'openid_association_server_' string
public associationServerKey ( $server_url )

getAssociation() public method

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

removeAssociation() public method

Immediately delete association from Redis.
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 )

Property Details

$prefix protected_oe property

Prefix for Redis keys
protected string $prefix
return string

$redis protected_oe property

protected Client,Predis $redis
return Predis\Client