protected function removeNonce($nonce)
    {
        if (null === $this->registryRepository) {
            @unlink($this->nonceDir.DIRECTORY_SEPARATOR.$nonce);
        } else {
            $registry = $this->getRegistry($nonce);
            $this->registryRepository->remove($registry);
        }
    }