lib/fire_cloud_client.rb
# refresh access_token when expired and stores back in FireCloudClient instance
#
# * *return*
#   - +DateTime+ timestamp of new access token expiration
refresh access_token when expired and stores back in FireCloudClient instance
*return
+DateTime+ timestamp of new access token expiration
refresh access_token when expired and stores back in FireCloudClient instance * return + DateTime + timestamp of new access token expiration
def refresh_access_token
    if self.user.nil?
      new_token = FireCloudClient.generate_access_token(self.service_account_credentials)
      new_expiry = Time.now + new_token['expires_in']
      self.access_token = new_token
      self.expires_at = new_expiry
    else
      new_token = self.user.generate_access_token
      self.access_token = new_token
      self.expires_at = new_token['expires_at']
    end
    new_token
  end
def refresh_access_token if self . user . nil? new_token = FireCloudClient . generate_access_token ( self . service_account_credentials ) new_expiry = Time . now + new_token [ 'expires_in' ] self . access_token = new_token self . expires_at = new_expiry else new_token = self . user . generate_access_token self . access_token = new_token self . expires_at = new_token [ 'expires_at' ] end new_token end
refresh access_token when expired and stores back in FireCloudClient instance
 *return
 +DateTime+ timestamp of new access token expiration
refresh access_token when expired and stores back in FireCloudClient instance * return + DateTime + timestamp of new access token expiration