lib/warden-oauthed/proxy.rb in warden-oauthed-0.0.1 vs lib/warden-oauthed/proxy.rb in warden-oauthed-0.0.2

- old
+ new

@@ -6,22 +6,17 @@ def initialize(client_id, secret, scopes, oauth_domain, callback_url) @client_id, @secret, @scopes, @oauth_domain, @callback_url = client_id, secret, scopes, oauth_domain, callback_url end def ssl_options - ca_file = "/usr/lib/ssl/certs/ca-certificates.crt" - if File.exists?(ca_file) - { :ca_file => ca_file } - else - { :ca_file => ''} - end + { version: :TLSv1 } end def client @client ||= OAuth2::Client.new(@client_id, @secret, - :ssl => ssl_options, - :site => oauth_domain, - :authorize_url => '/oauth/authorize') + ssl: ssl_options, + site: oauth_domain, + authorize_url: '/oauth/authorize') end def api_for(code) client.auth_code.get_token(code, :redirect_uri => callback_url) end