PayPal\Auth\Oauth\OAuthServer::check_nonce PHP Method

check_nonce() private method

check that the nonce is not repeated
private check_nonce ( $consumer, $token, $nonce, $timestamp )
    private function check_nonce($consumer, $token, $nonce, $timestamp)
    {
        if (!$nonce) {
            throw new OAuthException('Missing nonce parameter. The parameter is required');
        }
        // verify that the nonce is uniqueish
        $found = $this->data_store->lookup_nonce($consumer, $token, $nonce, $timestamp);
        if ($found) {
            throw new OAuthException("Nonce already used: {$nonce}");
        }
    }