[go: nahoru, domu]

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

[supply] added support for refresh tokens as an authentication method #16414

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Prev Previous commit
Next Next commit
fixed error message not showing when no authentication parameters pro…
…vided
  • Loading branch information
moly committed May 14, 2020
commit 4167a1f5142a8772744cadff2b6fc7ace356de0d
4 changes: 2 additions & 2 deletions supply/lib/supply/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,8 @@ def self.make_from_config(params: nil)
elsif params[:refresh_token] || params[:refresh_token_data]
refresh_token_data = self.refresh_token_authentication(params: params)
return self.new(refresh_token_json: refresh_token_data, params: params)
else
UI.user_error!("No authentication parameters were specified. These must be provided in order to authenticate with Google")
end
end

Expand All @@ -150,8 +152,6 @@ def self.service_account_authentication(params: nil)
}
service_account_json = StringIO.new(JSON.dump(cred_json))
service_account_json
else
UI.user_error!("No authentication parameters were specified. These must be provided in order to authenticate with Google")
end
end

Expand Down