From 0a7d340c28b35189a741d8a4de0ca0d7d95fb300 Mon Sep 17 00:00:00 2001 From: Oussama Harzallah Date: Thu, 26 Sep 2024 15:16:05 +0200 Subject: [PATCH] fix: load accepted algorithms from defined constant --- src/Command/GenerateKeyPairCommand.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Command/GenerateKeyPairCommand.php b/src/Command/GenerateKeyPairCommand.php index b6660c7..58bdeaa 100644 --- a/src/Command/GenerateKeyPairCommand.php +++ b/src/Command/GenerateKeyPairCommand.php @@ -59,7 +59,7 @@ protected function configure(): void $this->addOption('dry-run', null, InputOption::VALUE_NONE, 'Do not update key files.'); $this->addOption('skip-if-exists', null, InputOption::VALUE_NONE, 'Do not update key files if they already exist.'); $this->addOption('overwrite', null, InputOption::VALUE_NONE, 'Overwrite key files if they already exist.'); - $this->addArgument('algorithm', InputArgument::OPTIONAL, 'The algorithm code, possible values : RS256|RS384|RS512|HS256|HS384|HS512|ES256|ES384|ES512', 'RS256'); + $this->addArgument('algorithm', InputArgument::OPTIONAL, sprintf('The algorithm code, possible values : %s', implode(self::ACCEPTED_ALGORITHMS)), 'RS256'); } protected function execute(InputInterface $input, OutputInterface $output): int