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.
@@ -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
|
-
|
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'] }
|