File tree Expand file tree Collapse file tree 2 files changed +17
-0
lines changed
src/Symfony/Bundle/DependencyInjection
tests/Symfony/Bundle/DependencyInjection Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -269,6 +269,7 @@ private function addOAuthSection(ArrayNodeDefinition $rootNode): void
269269 ->scalarNode ('authorizationUrl ' )->defaultValue ('' )->info ('The oauth authentication url. ' )->end ()
270270 ->scalarNode ('refreshUrl ' )->defaultValue ('' )->info ('The oauth refresh url. ' )->end ()
271271 ->arrayNode ('scopes ' )
272+ ->normalizeKeys (false )
272273 ->prototype ('scalar ' )->end ()
273274 ->end ()
274275 ->end ()
Original file line number Diff line number Diff line change @@ -528,4 +528,20 @@ public function testElasticsearchSslCaBundleAndVerificationDisabledMutuallyExclu
528528 ],
529529 ]);
530530 }
531+
532+ public function testOauthScopeNaming (): void
533+ {
534+ $ config = $ this ->processor ->processConfiguration ($ this ->configuration , [
535+ 'api_platform ' => [
536+ 'oauth ' => [
537+ 'enabled ' => true ,
538+ 'scopes ' => [
539+ 'resource:read-write ' => 'Read and write resource data ' ,
540+ ],
541+ ],
542+ ],
543+ ]);
544+
545+ $ this ->assertEquals (['resource:read-write ' => 'Read and write resource data ' ], $ config ['oauth ' ]['scopes ' ]);
546+ }
531547}
You can’t perform that action at this time.
0 commit comments