Skip to content

Commit

Permalink
Fix for fetching auth token when using https instead of http (#13)
Browse files Browse the repository at this point in the history
Fix for fetching auth token when using https instead of http
  • Loading branch information
ssnyder-intrinio authored Jan 24, 2022
1 parent b3d5505 commit 5b228f9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/intrinio-realtime.rb
Original file line number Diff line number Diff line change
Expand Up @@ -317,12 +317,13 @@ def handle_data
end
end
end

def refresh_token
@token = nil

uri = URI.parse(auth_url)
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true if (auth_url.include?("https"))
http.start
request = Net::HTTP::Get.new(uri.request_uri)
request.add_field("Client-Information", "IntrinioRealtimeRubySDKv3.1")
Expand Down

0 comments on commit 5b228f9

Please sign in to comment.