diff --git a/languages/ruby/bitwarden_sdk/lib/bitwarden-sdk.rb b/languages/ruby/bitwarden_sdk/lib/bitwarden-sdk.rb index b023402da..b4e934022 100644 --- a/languages/ruby/bitwarden_sdk/lib/bitwarden-sdk.rb +++ b/languages/ruby/bitwarden_sdk/lib/bitwarden-sdk.rb @@ -43,8 +43,8 @@ def initialize(bitwarden_settings) @secrets_client = SecretsClient.new(@command_runner) end - def access_token_login(access_token) - access_token_request = AccessTokenLoginRequest.new(access_token: access_token) + def access_token_login(access_token, state_file = nil) + access_token_request = AccessTokenLoginRequest.new(access_token: access_token, state_file: state_file) @command_runner.run(SelectiveCommand.new(access_token_login: access_token_request)) nil end diff --git a/languages/ruby/examples/example.rb b/languages/ruby/examples/example.rb index 09192aa5d..addc882c8 100644 --- a/languages/ruby/examples/example.rb +++ b/languages/ruby/examples/example.rb @@ -3,6 +3,7 @@ token = ENV['ACCESS_TOKEN'] organization_id = ENV['ORGANIZATION_ID'] +state_path = ENV['STATE_PATH'] # Configuring the URLS is optional, set them to nil to use the default values api_url = ENV['API_URL'] @@ -11,7 +12,7 @@ bitwarden_settings = BitwardenSDK::BitwardenSettings.new(api_url, identity_url) bw_client = BitwardenSDK::BitwardenClient.new(bitwarden_settings) -response = bw_client.access_token_login(token) +response = bw_client.access_token_login(token, state_path) puts response # CREATE project