PHP Класс Auth_OpenID_PredisStore

Uses Predis library {@see https://github.com/nrk/predis}. Requires PHP >= 5.3.
Наследование: extends Auth_OpenID_OpenIDStore
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$prefix string Prefix for Redis keys
$redis Predis\Client

Открытые методы

Метод Описание
__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.

Приватные методы

Метод Описание
getAssociationFromServer ( $associationKey ) Function to actually receive and unserialize the association from the server.
nonceKey ( $server_url, $salt ) Build up nonce key

Описание методов

__construct() публичный Метод

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() публичный Метод

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

associationServerKey() публичный Метод

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

getAssociation() публичный Метод

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

removeAssociation() публичный Метод

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

storeAssociation() публичный Метод

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

supportsCleanup() публичный Метод

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

useNonce() публичный Метод

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

Описание свойств

$prefix защищенное свойство

Prefix for Redis keys
protected string $prefix
Результат string

$redis защищенное свойство

protected Client,Predis $redis
Результат Predis\Client