Skip to content

Commit

Permalink
Allow "use_authorization_to_get_token" to be configured to false for …
Browse files Browse the repository at this point in the history
…generic OAuth2 (#1974)

* Allow "use_authorization_to_get_token" to be configured to false for generic OAuth2

Backport of the fix #1879  for branch 2.0

* Fix phpcsfixer
  • Loading branch information
ldaspt committed Feb 9, 2024
1 parent c36bf22 commit 96c4474
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,13 @@ private function addResourceOwnersConfiguration(ArrayNodeDefinition $node): void
->end()
->scalarNode('use_authorization_to_get_token')
->validate()
->ifEmpty()
->ifTrue(function ($v) {
if (false === $v) {
return false;
}

return empty($v);
})
->thenUnset()
->end()
->end()
Expand Down

0 comments on commit 96c4474

Please sign in to comment.