Skip to content

Commit

Permalink
[SM-1076] - add state_file_path param to access_token_login (#496)
Browse files Browse the repository at this point in the history
## 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 <[email protected]>
  • Loading branch information
tangowithfoxtrot and dani-garcia authored Jan 13, 2024
1 parent 4c91270 commit aef6a21
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions languages/python/bitwarden_sdk/bitwarden_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit aef6a21

Please sign in to comment.