class Google::APIClient::ComputeServiceAccount
Public Instance Methods
fetch_access_token(options={})
click to toggle source
# File lib/google/api_client/auth/compute_service_account.rb, line 21 def fetch_access_token(options={}) connection = options[:connection] || Faraday.default_connection response = connection.get 'http://metadata/computeMetadata/v1beta1/instance/service-accounts/default/token' Signet::OAuth2.parse_credentials(response.body, response.headers['content-type']) end