omniauth-thingiverse 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,5 @@
1
1
  module Omniauth
2
2
  module Thingiverse
3
- VERSION = "0.0.2"
3
+ VERSION = "0.0.3"
4
4
  end
5
5
  end
@@ -9,8 +9,16 @@ module OmniAuth
9
9
  :token_url => '/login/oauth/access_token',
10
10
  :token_method => :get
11
11
  }
12
+ #taken from https://github.com/intridea/omniauth/blob/0-3-stable/oa-oauth/lib/omniauth/strategies/oauth/tsina.rb#L52-67
12
13
  def request_phase
13
- super
14
+ request_token = consumer.get_request_token(:oauth_callback => callback_url)
15
+ puts options[:authorize_params].delete(:state)
16
+ redirect request_token.authorize_url(options[:authorize_params])
17
+
18
+ rescue ::Timeout::Error => e
19
+ fail!(:timeout, e)
20
+ rescue ::Net::HTTPFatalError, ::OpenSSL::SSL::SSLError => e
21
+ fail!(:service_unavailable, e)
14
22
  end
15
23
 
16
24
  uid { raw_info['uid'] }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-thingiverse
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: