class Google::Auth::UserRefreshCredentials
def self.read_json_key json_key_io
Reads the client_id, client_secret and refresh_token fields from the
def self.read_json_key json_key_io json_key = MultiJson.load json_key_io.read wanted = ["client_id", "client_secret", "refresh_token"] wanted.each do |key| raise "the json is missing the #{key} field" unless json_key.key? key end json_key end