omniauth-campus 6.6 → 6.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9029b4afae58395925fa25b47980e0b331d894a3
4
- data.tar.gz: f3092a21f66864bd17268a9dfb2ce6ae9ad14898
3
+ metadata.gz: e71a5d888c21dfaf8429e982204762d7d3436144
4
+ data.tar.gz: 6bd98ed410a44fb614220dd0e66915f466311bfe
5
5
  SHA512:
6
- metadata.gz: 10899ec7b86a2e65ba2228d1927d7ae460eef992ee35e52884410084205e28efb7d93cc908edd91d4d1dc42e5a7bcc502c353fb407da957ef3a349065e62453c
7
- data.tar.gz: 494ffb0d229741b6f083f0a9beb7d5a02b71b14dcabc7b8e8c2fb6e4dc34632e37676a2537ccb4939ac4183b3820c44e698cd02f223ad7f46123d7083c8317cd
6
+ metadata.gz: 2a77bf93d98125e8abbc18f41c620ea10b45a27f08a6c3a0a995ec4ff34af6d47d2c9b7016fa1c96ae9e3c8d869f0057f36448722ab02087e674d05d74a45560
7
+ data.tar.gz: c0272520f20c8473e48d0c61d3d7a3e8a44716e03aec2c630426fb616809c19dbfd09dc8a157c344134ea2cbe9aa82af400fc5bc61c004bcea9a9a330bbb9ee9
@@ -1,6 +1,6 @@
1
1
  module Omniauth
2
2
  module Campus
3
- VERSION = "6.6"
3
+ VERSION = "6.7"
4
4
  end
5
5
  end
6
6
 
@@ -46,16 +46,33 @@ module OmniAuth
46
46
  }
47
47
  end
48
48
 
49
+ def request_phase
50
+ request_token = consumer.get_request_token(:oauth_callback => callback_url)
51
+ session['oauth'] ||= {}
52
+ session['oauth'][name.to_s] = {'callback_confirmed' => request_token.callback_confirmed?, 'request_token' => request_token.token, 'request_secret' => request_token.secret}
53
+
54
+ if request_token.callback_confirmed?
55
+ redirect request_token.authorize_url(options[:authorize_params].merge(:oauth_consumer_key => consumer.key))
56
+ else
57
+ redirect request_token.authorize_url(options[:authorize_params].merge(:oauth_callback => callback_url, :oauth_consumer_key => consumer.key))
58
+ end
59
+
60
+ rescue ::Timeout::Error => e
61
+ fail!(:timeout, e)
62
+ rescue ::Net::HTTPFatalError, ::OpenSSL::SSL::SSLError => e
63
+ fail!(:service_unavailable, e)
64
+ end
65
+
49
66
  def raw_info
50
- @raw_info ||= MultiJson.decode(access_token.get("#{options[:client_options][:site]}/myawesomejson/user.json").body)
67
+ @raw_info ||= MultiJson.decode(access_token.get("#{options[:client_options][:site]}/myawesomejson/user/#{@access_token.params[:uid]}.json").body)
51
68
  rescue ::Errno::ETIMEDOUT
52
69
  raise ::Timeout::Error
53
70
  end
54
71
 
55
- def request_phase
56
- options[:authorize_params] = {:perms => options[:scope]} if options[:scope]
57
- super
58
- end
72
+ #def request_phase
73
+ # options[:authorize_params] = {:perms => options[:scope]} if options[:scope]
74
+ # super
75
+ #end
59
76
 
60
77
 
61
78
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-campus
3
3
  version: !ruby/object:Gem::Version
4
- version: '6.6'
4
+ version: '6.7'
5
5
  platform: ruby
6
6
  authors:
7
7
  - johnvehr
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-24 00:00:00.000000000 Z
11
+ date: 2014-03-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler