Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SUPPORT-8272 fix _find_api_key_location #190

Merged
merged 1 commit into from
Oct 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions python-sync-actions/src/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -352,19 +352,19 @@ def build_request_content(method: Literal['GET', 'POST', 'FORM'], params: dict)

def _find_api_key_location(dictionary):
position = None
key = None
final_key = None

for key, val in dictionary.get('defaultOptions', {}).get('params', {}).items():
if val == {'attr': '#__AUTH_TOKEN'}:
key = key
final_key = key
position = 'query'

for key, val in dictionary.get('headers', {}).items():
if val == {'attr': '#__AUTH_TOKEN'}:
key = key
final_key = key
position = 'headers'

return position, key
return position, final_key


class AuthMethodConverter:
Expand Down
Loading