8000 [SecurityBundle] Add missing fixXmlConfig() calls for OIDC token hand… · symfony/symfony@256bee4 · GitHub
[go: up one dir, main page]

Skip to content

Commit 256bee4

Browse files
committed
[SecurityBundle] Add missing fixXmlConfig() calls for OIDC token handler arrays
Add fixXmlConfig() calls for 'issuers' and 'algorithms' arrays to allow using singular XML tags that get automatically converted to plural form. This improves XML configuration ergonomics. As requested in PR #60929
1 parent 06e4c90 commit 256bee4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/AccessToken/OidcTokenHandlerFactory.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@ public function addConfiguration(NodeBuilder $node): void
9090
{
9191
$node
9292
->arrayNode($this->getKey())
93-
->fixXmlConfig($this->getKey())
9493
->validate()
9594
->ifTrue(static fn ($v) => !isset($v['discovery']) && !isset($v['keyset']))
9695
->thenInvalid('You must set either "discovery" or "keyset".')
@@ -126,11 +125,13 @@ public function addConfiguration(NodeBuilder $node): void
126125
->arrayNode('issuers')
127126
->info('Issuers allowed to generate the token, for validation purpose.')
128127
->isRequired()
128+
->fixXmlConfig('issuer')
129129
->scalarPrototype()->end()
130130
->end()
131131
->arrayNode('algorithms')
132132
->info('Algorithms used to sign the token.')
133133
->isRequired()
134+
->fixXmlConfig('algorithm')
134135
->scalarPrototype()->end()
135136
->end()
136137
->scalarNode('keyset')
@@ -147,6 +148,7 @@ public function addConfiguration(NodeBuilder $node): void
147148
->info('Algorithms used to decrypt the token.')
148149
->isRequired()
149150
->requiresAtLeastOneElement()
151+
->fixXmlConfig('algorithm')
150152
->scalarPrototype()->end()
151153
->end()
152154
->scalarNode('keyset')

0 commit comments

Comments
 (0)
0