| @@ 34-56 (lines=23) @@ | ||
| 31 | ||
| 32 | final class BootstrapGsspSecondFactorCommand extends AbstractBootstrapCommand |
|
| 33 | { |
|
| 34 | protected function configure() |
|
| 35 | { |
|
| 36 | $this |
|
| 37 | ->setDescription('Creates a Generic SAML Second Factor (GSSF) second factor for a specified user') |
|
| 38 | ->addArgument('name-id', InputArgument::REQUIRED, 'The NameID of the identity to create') |
|
| 39 | ->addArgument('institution', InputArgument::REQUIRED, 'The institution of the identity to create') |
|
| 40 | ->addArgument( |
|
| 41 | 'gssp-token-type', |
|
| 42 | InputArgument::REQUIRED, |
|
| 43 | 'The GSSP token type as defined in the GSSP config, for example tiqr or webauthn' |
|
| 44 | ) |
|
| 45 | ->addArgument( |
|
| 46 | 'gssp-token-identifier', |
|
| 47 | InputArgument::REQUIRED, |
|
| 48 | 'The identifier of the token as registered at the GSSP' |
|
| 49 | ) |
|
| 50 | ->addArgument( |
|
| 51 | 'registration-status', |
|
| 52 | InputArgument::REQUIRED, |
|
| 53 | 'Valid arguments: unverified, verified, vetted' |
|
| 54 | ) |
|
| 55 | ->addArgument('actor-id', InputArgument::REQUIRED, 'The id of the vetting actor'); |
|
| 56 | } |
|
| 57 | ||
| 58 | protected function execute(InputInterface $input, OutputInterface $output) |
|
| 59 | { |
|
| @@ 33-43 (lines=11) @@ | ||
| 30 | ||
| 31 | final class BootstrapIdentityCommand extends AbstractBootstrapCommand |
|
| 32 | { |
|
| 33 | protected function configure() |
|
| 34 | { |
|
| 35 | $this |
|
| 36 | ->setDescription('Creates an identity') |
|
| 37 | ->addArgument('name-id', InputArgument::REQUIRED, 'The NameID of the identity to create') |
|
| 38 | ->addArgument('institution', InputArgument::REQUIRED, 'The institution of the identity to create') |
|
| 39 | ->addArgument('common-name', InputArgument::REQUIRED, 'The Common Name of the identity to create') |
|
| 40 | ->addArgument('email', InputArgument::REQUIRED, 'The e-mail address of the identity to create') |
|
| 41 | ->addArgument('preferred-locale', InputArgument::REQUIRED, 'The preferred locale of the identity to create') |
|
| 42 | ->addArgument('actor-id', InputArgument::REQUIRED, 'The id of the vetting actor'); |
|
| 43 | } |
|
| 44 | ||
| 45 | protected function execute(InputInterface $input, OutputInterface $output) |
|
| 46 | { |
|
| @@ 59-74 (lines=16) @@ | ||
| 56 | */ |
|
| 57 | private $projectionRepository; |
|
| 58 | ||
| 59 | protected function configure() |
|
| 60 | { |
|
| 61 | $this |
|
| 62 | ->setName('middleware:bootstrap:identity-with-yubikey') |
|
| 63 | ->setDescription('Creates an identity with a vetted Yubikey second factor') |
|
| 64 | ->addArgument('name-id', InputArgument::REQUIRED, 'The NameID of the identity to create') |
|
| 65 | ->addArgument('institution', InputArgument::REQUIRED, 'The institution of the identity to create') |
|
| 66 | ->addArgument('common-name', InputArgument::REQUIRED, 'The Common Name of the identity to create') |
|
| 67 | ->addArgument('email', InputArgument::REQUIRED, 'The e-mail address of the identity to create') |
|
| 68 | ->addArgument('preferred-locale', InputArgument::REQUIRED, 'The preferred locale of the identity to create') |
|
| 69 | ->addArgument( |
|
| 70 | 'yubikey', |
|
| 71 | InputArgument::REQUIRED, |
|
| 72 | 'The public ID of the Yubikey. Remove the last 32 characters of a Yubikey OTP to acquire this.' |
|
| 73 | ); |
|
| 74 | } |
|
| 75 | ||
| 76 | public function __construct( |
|
| 77 | ServiceEntityRepository $projectionRepository, |
|