[18.0][FIX] webservice: reset oauth2_flow regardless of server_environment - #161
Open
simahawk wants to merge 1 commit into
Open
[18.0][FIX] webservice: reset oauth2_flow regardless of server_environment#161simahawk wants to merge 1 commit into
simahawk wants to merge 1 commit into
Conversation
PR#146 split server_environment out of `webservice` into the optional `webservice_server_env` module, but the logic resetting `oauth2_flow` when `auth_type` is no longer "oauth2" only lived in `webservice_server_env`'s `_compute_server_env` override. Without `server_environment` installed, switching a backend's `auth_type` away from "oauth2" (via the UI or a plain write) silently left a stale `oauth2_flow`, which `_get_adapter_protocol` would then still factor into the selected component. Add an `_onchange_auth_type` plus `create`/`write` overrides on `webservice.backend` itself so the reset is guaranteed unconditionally, independent of `server_environment`. `webservice_server_env`'s own override is unchanged and still covers its own case (env-var-driven values).
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.
#146 split server_environment out of
webserviceinto the optionalwebservice_server_envmodule, but the logic resettingoauth2_flowwhenauth_typeis no longer "oauth2" only lived inwebservice_server_env's_compute_server_envoverride.Without
server_environmentinstalled, switching a backend'sauth_typeaway from "oauth2" (via the UI or a plain write) silently left a staleoauth2_flow, which_get_adapter_protocolwould then still factor into the selected component.Add an
_onchange_auth_typepluscreate/writeoverrides onwebservice.backenditself so the reset is guaranteed unconditionally, independent ofserver_environment.webservice_server_env's own override is unchanged and still covers its own case (env-var-driven values).CC @yankinmax @gurneyalex