From aef6a21592a14874f9fc172b5a241f1daa84dc50 Mon Sep 17 00:00:00 2001 From: tangowithfoxtrot <5676771+tangowithfoxtrot@users.noreply.github.com> Date: Fri, 12 Jan 2024 18:41:12 -0800 Subject: [PATCH] [SM-1076] - add `state_file_path` param to `access_token_login` (#496) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Type of change - [ ] Bug fix - [ ] New feature development - [ ] Tech debt (refactoring, code cleanup, dependency upgrades, etc) - [ ] Build/deploy pipeline (DevOps) - [x] Other ## Objective Enable authentication with the state file. Relates to #388. ## Code changes - **`languages/python/bitwarden_sdk/bitwarden_client.py`**: Add optional `state_file_path` parameter to `access_token_login` ## Before you submit - Please add **unit tests** where it makes sense to do so --------- Co-authored-by: Daniel GarcĂ­a --- languages/python/bitwarden_sdk/bitwarden_client.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/languages/python/bitwarden_sdk/bitwarden_client.py b/languages/python/bitwarden_sdk/bitwarden_client.py index cb669a40e..b5ea48c44 100644 --- a/languages/python/bitwarden_sdk/bitwarden_client.py +++ b/languages/python/bitwarden_sdk/bitwarden_client.py @@ -12,9 +12,10 @@ def __init__(self, settings: ClientSettings = None): settings_json = json.dumps(settings.to_dict()) self.inner = bitwarden_py.BitwardenClient(settings_json) - def access_token_login(self, access_token: str): + def access_token_login(self, access_token: str, + state_file_path: str = None): self._run_command( - Command(access_token_login=AccessTokenLoginRequest(access_token)) + Command(access_token_login=AccessTokenLoginRequest(access_token, state_file_path)) ) def secrets(self):