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

SM-1092: Add SM State to the Ruby SDK Wrapper #565

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions languages/ruby/bitwarden_sdk/lib/bitwarden-sdk.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion languages/ruby/examples/example.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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']
Expand All @@ -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
Expand Down
Loading