Repository navigation
Make the HTTP client replaceable and give it timeouts - #92
Merged
Merged
Conversation
All requests of this package to the identity provider now use an HTTP client from HttpClientFactoryInterface: discovery, keys and refreshing identity tokens in OpenIdConnectClient, and exchanging codes and requesting tokens in its OAuth client. The default factory gives the client a connect timeout of 5 seconds and a timeout of 10 seconds, configurable with the setting "httpClient". Previously, OpenIdConnectClient created a Guzzle client with "new" in its constructor, without any limit, and the OAuth client used the default of the OAuth2 package, also without a limit. An identity provider which didn't answer kept requests, and workers fetching access tokens, waiting until PHP or the web server gave up. The factory can be replaced in Objects.yaml, for example to use a proxy. Tests of applications can replace it with one whose client answers without the network, instead of filling the caches of this package with identifiers taken from its internals. Resolves: #84
robertlemke
force-pushed
the
feature/replaceable-http-client
branch
from
October 9, 2026 12:58
611d174 to
c00d002
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
All requests of this package to the identity provider now go through an HTTP client from
HttpClientFactoryInterface: discovery, keys and refresh inOpenIdConnectClient, and code exchange and token requests in its OAuth client. The default factory sets a connect timeout of 5 seconds and a timeout of 10 seconds, configurable withFlownative.OpenIdConnect.Client.httpClient. Previously none of these requests had a limit.Applications can replace the factory in
Objects.yaml, for a proxy or, in tests, for a client which answers without the network. The README describes both.Resolves: #84