Auth_OpenID_MemcachedStore::useNonce PHP Метод

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

Create nonce for server and salt, expiring after $Auth_OpenID_SKEW seconds.
public useNonce ( $server_url, $timestamp, $salt )
    function useNonce($server_url, $timestamp, $salt)
    {
        global $Auth_OpenID_SKEW;
        // save one request to memcache when nonce obviously expired
        if (abs($timestamp - time()) > $Auth_OpenID_SKEW) {
            return false;
        }
        // returns false when nonce already exists
        // otherwise adds nonce
        return $this->connection->add('openid_nonce_' . sha1($server_url) . '_' . sha1($salt), 1, $this->compress, $Auth_OpenID_SKEW);
    }