*/ 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:----khfV7DiXLkD4ECuO4BVE2g43C8F7wMXp0U8AjnsmbyO3LHctvltqJm8E0UVy8RAVl29MIzW8afrqrHZ1h4PDHnQ+FqPHS/eHg99p0b6J9SY/Sdd/p2sBYlvERjr9mJC3QzS3gwv9e4AcGPTTJ5TengkRSwcNc956MsFRUEmrNbBAy8Czn3NTeVtlLBD7N3dlCJZUJzLJYzlE9Pcd+/PfE+WhNhNd/8zlvniGWtAA4h3XuvbnTeEqcxkMArjrPQKroDiGOUZahcMm6AlFb2WYeAc3dHscK/wjMYNbqskhlJVIzgtQGLoHJ9zQ+dvExzoT30QkWeiHyzNeTJz6K24s5gGOXn2kW8SoXV9Sv3ZzhIQ6inWu1zuhaTuT0eajT92p34C7fPw4KLUigQO+jY6dHNvUPZk+1XEBxeTxdxVL2MNEmwIObQaUHLkAQOmcCVqcVFW9qsg3mBDitXO0wXqmhP6PVDZ2hSup45DawraUGoNgOAJB2/II4Mdu1W7HMFzNHe7FmPfaypBORuWWtT1bB4rXIQ170k5m5ycd6wY86VyRmPCkgQg7eYpfMx0Myo47j/yf0Ly/jElVfSgdD00qKbyN/uAZVLrU8vV985Dccg3u732LsYrbLgz/w4KCjrcNRjk8lC/Opppx03ggnVjZSJj7RRAqDjMuozasfGj197I=----ATTACHMENT:----OTMyNDk5NDcxMzcxMDk3NCA1NzMzODU2NzM1MTk1MDUxIDkxODk2NjUyMDMxODgyMQ==