You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I believe calling http_config multiple times should instead either sum the configurations (by storing the blocks in an array, for instance), or overwrite the configuration each time it is called. In the latter case, an explicit setter would be more intuitive, though slightly more verbose:
OpenIDConnect.http_config=->(faraday){…}
As a workaround, I have resorted to setting @@http_config directly instead, but that feels pretty hacky. I have noticed that Rack::OAuth2 provides a reset_http_config! method instead, but the other gems don’t, and a setter would feel more natural anyway.
Alternatively, I wish I could pass my HTTP configuration every time I instantiate a class that performs HTTP requests rather than rely on a global state.
Best regards.
The text was updated successfully, but these errors were encountered:
We have a need for this as well. Would like to be able to define a custom SSL config on a per-connection basis. We'd like to to support multiple OIDC providers where some of them may have custom CA certs and/or proxies that need to be able to pass TLS verification, with the user being able to configure the needed CA certs in the app.
Any plans to implement or accept contributions around this enhancement? Thanks!
Greetings,
Thank you for all the gems.
In order to reconfigure the Faraday client OpenIDConnect uses, I have tried the following:
However, this doesn’t work because OpenIDConnect.http_config only accepts the first configuration, and so do the gems for the sub-protocols.
openid_connect/lib/openid_connect.rb
Lines 78 to 83 in 2fdafc3
I believe calling http_config multiple times should instead either sum the configurations (by storing the blocks in an array, for instance), or overwrite the configuration each time it is called. In the latter case, an explicit setter would be more intuitive, though slightly more verbose:
As a workaround, I have resorted to setting
@@http_config
directly instead, but that feels pretty hacky. I have noticed that Rack::OAuth2 provides areset_http_config!
method instead, but the other gems don’t, and a setter would feel more natural anyway.Alternatively, I wish I could pass my HTTP configuration every time I instantiate a class that performs HTTP requests rather than rely on a global state.
Best regards.
The text was updated successfully, but these errors were encountered: