Skip to content

Commit b217b61

Browse files
tomasz-kusySpomky
authored andcommitted
feat: expose hide_existing_credentials in bundle registration section (#786)
1 parent db82ce1 commit b217b61

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/symfony/src/DependencyInjection/Factory/Security/WebauthnFactory.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,9 @@ public function addConfiguration(NodeDefinition $builder): void
176176
->arrayNode('registration')
177177
->canBeEnabled()
178178
->children()
179+
->booleanNode('hide_existing_credentials')
180+
->defaultTrue()
181+
->end()
179182
->scalarNode('profile')
180183
->defaultValue('default')
181184
->end()
@@ -347,6 +350,7 @@ private function createAttestationControllersAndRoutes(
347350
$config['options_storage'],
348351
$config['registration']['options_handler'],
349352
$config['failure_handler'],
353+
$config['registration']['hide_existing_credentials'],
350354
);
351355
if ($config['registration']['routes']['result_path'] !== null) {
352356
$this->createResponseControllerAndRoute(
@@ -401,6 +405,7 @@ private function createAttestationRequestControllerAndRoute(
401405
null|string $optionsStorageId,
402406
string $optionsHandlerId,
403407
string $failureHandlerId,
408+
bool $hideExistingCredentials,
404409
): void {
405410
$controller = (new Definition(AttestationRequestController::class))
406411
->setFactory([new Reference(AttestationControllerFactory::class), 'createRequestController'])
@@ -410,7 +415,7 @@ private function createAttestationRequestControllerAndRoute(
410415
new Reference($optionsStorageId ?? OptionsStorage::class),
411416
new Reference($optionsHandlerId),
412417
new Reference($failureHandlerId),
413-
true,
418+
$hideExistingCredentials,
414419
]);
415420
$this->createControllerAndRoute(
416421
$container,

0 commit comments

Comments
 (0)