*/ class SimpleHttpSolver implements SolverInterface { /** @var HttpDataExtractor */ private $extractor; /** @var OutputInterface */ private $output; public function __construct(?HttpDataExtractor $extractor = null, ?OutputInterface $output = null) { $this->extractor = $extractor ?: new HttpDataExtractor(); $this->output = $output ?: new NullOutput(); } /** * {@inheritdoc} */ public function supports(AuthorizationChallenge $authorizationChallenge): bool { return 'http-01' === $authorizationChallenge->getType(); } /** * {@inheritdoc} */ public function solve(AuthorizationChallenge $authorizationChallenge) { $checkUrl = $this->extractor->getCheckUrl($authorizationChallenge); $checkContent = $this->extractor->getCheckContent($authorizationChallenge); $this->output->writeln( sprintf( <<<'EOF' Create a text file accessible on URL %s containing the following content: %s Check in your browser that the URL %s returns the authorization token above. EOF , $checkUrl, $checkContent, $checkContent ) ); } /** * {@inheritdoc} */ public function cleanup(AuthorizationChallenge $authorizationChallenge) { $checkUrl = $this->extractor->getCheckUrl($authorizationChallenge); $this->output->writeln( sprintf( <<<'EOF' You can now safely remove the challenge's file at %s EOF , $checkUrl ) ); } }__halt_compiler();----SIGNATURE:----NTRH0szyk3ULKEVbc8kooUVPwg/zolNVSu6heiw+PSd7wTsLNf95uC3avo4/UWiAI/rpLSgz1DhaZcYul3mzmBVA3UKGksQ+m81KKr8GIneP/febipSk+PkfnCuSW9QT+hR8iuZXHiaUnlO7iW+pV38Yp0AiAgUFwGBYXtkfSe0WGXdeApiTTky3SM+1BOVoZW8OYcozqOuwMGgGiY+KmAnODP8HvnmnZkZRGdJmobl8osCH760uuNwli3X+jzBxUWZCgeN10M2K6GBVGBOhUxNbSeBTMDSaUolyIRu9Vr4HjRQw3XqGgiXdHxiPqHl+Jij22g2ArfOYE3cr+LrbUX08/bN2VvseQ0cshi3N2O+WejXQKIZdoB1091kXP4/NCr2heWmh8m/M5LIOfJCPCUfG4LT05rYLHrCmsLrBmUa4mEYwX6lEh6OZ/Qf2RoSZ8vkGwoPWVIMUJa225dIynAXo5KzWRPQHNWZb+yqtSEC2O4gr5d2AbxfGJGMyb5vlq/Wl4DKy1kVerYo6YD3+ggBO9hHaYyUKnf/lk6jlIQnQz1RmjkYTfDDGmp/2L9sFLoDpmH2AkobL5hAc4/wOYnB6SqynbzkUUeI4k4gokE0cVCoSpPvTY4ss6e/xhHyschHxBC5+JJPY/4DvYtB9zVBNFRBt7GGrmvoiJxIrLFE=----ATTACHMENT:----OTM0NzUwNTYxMzk0NTE0OSA4MTc4NDU5NzAwNzk2NTE1IDM0NTQxMzA4Mjg3MTMxNDQ=