Skip to content

Commit

Permalink
SUPPORT-8272 fix _find_api_key_location
Browse files Browse the repository at this point in the history
  • Loading branch information
kudj committed Oct 21, 2024
1 parent 15a9ce2 commit 594e145
Showing 1 changed file with 4 additions and 4 deletions.
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

0 comments on commit 594e145

Please sign in to comment.