omniauth-campus 1.1 → 1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 11d76f850d83a2c32e4029f8deee0183beaa763d
4
- data.tar.gz: 5108dbbd16f99e2f2d47c967d40075617eda4b84
3
+ metadata.gz: d8f3502ca0c026e3ac77aa9a953bff5cf30b1167
4
+ data.tar.gz: 490ad205651c633aaadbe77db0ac99c7c05afcec
5
5
  SHA512:
6
- metadata.gz: 20c186d4867f97d23297ba00d3caf5f5c7844e92aedf8c3b1a0faf5c2399be6f67ee5b960bb08b9eddf461c2e2104152f27026adff5276f47f4e2fd85ec16724
7
- data.tar.gz: 71bf53dee42371cc8fd925cfa69b5a8f7316e3a450d69aac62fa54512568a83333abf828aa3cac2c075b26205ccfb78c7698d045b33b26dd2397455fb95162d5
6
+ metadata.gz: 68f6c4d690704b8573ff37d6503b2a3f8d83118cb95929a135c3c05616aa923f1b220b83895c26d1b9f7ca7fa50cf000ccf53eb711ccc54bde95204ec7d80409
7
+ data.tar.gz: ec5eafef80568b337022a4f77d311a22c7f8f9a6812ec68c9db8d4d4ef0c66c057bb7e26c0bfd48093a6c739953db887a7361ce138e6f54fd331d650762a8f50
@@ -18,53 +18,31 @@ module OmniAuth
18
18
  option :consumer_key, nil
19
19
  option :consumer_secret, nil
20
20
 
21
- option :client_options, {:authorize_path => '/oauth/authenticate',
22
- :site => 'http://dev-oauth-test.gotpantheon.com/myawesomejson',
23
- :proxy => ENV['http_proxy'] ? URI(ENV['http_proxy']) : nil}
21
+ #option :client_options, {:authorize_path => '/oauth/authenticate'
22
+ #:site => 'http://dev-oauth-test.gotpantheon.com/myawesomejson',
23
+ #:proxy => ENV['http_proxy'] ? URI(ENV['http_proxy']) : nil}
24
24
 
25
- uid { access_token.params[:uid] }
26
25
 
27
- info do
26
+ uid{ request.params['user_id'] }
27
+
28
+ info do
28
29
  {
29
- :email => raw_info['email'],
30
30
  :name => raw_info['name'],
31
- }
31
+ :location => raw_info['city']
32
+ }
32
33
  end
33
34
 
34
-
35
- extra do
36
- { :raw_info => raw_info }
35
+ extra do
36
+ {
37
+ 'raw_info' => raw_info
38
+ }
37
39
  end
38
40
 
39
41
  def raw_info
40
- @raw_info ||= MultiJson.load(access_token.get('/1.1/account/verify_credentials.json?include_entities=false&skip_status=true').body)
41
- rescue ::Errno::ETIMEDOUT
42
- raise ::Timeout::Error
42
+ @raw_info ||= MultiJson.decode(access_token.get('/me.json')).body
43
43
  end
44
44
 
45
- alias :old_request_phase :request_phase
46
-
47
- def request_phase
48
- %w[force_login lang screen_name].each do |v|
49
- if request.params[v]
50
- options[:authorize_params][v.to_sym] = request.params[v]
51
- end
52
- end
53
45
 
54
- %w[x_auth_access_type].each do |v|
55
- if request.params[v]
56
- options[:request_params][v.to_sym] = request.params[v]
57
- end
58
- end
59
-
60
- if request.params['use_authorize'] == 'true'
61
- options[:client_options][:authorize_path] = '/oauth/authorize'
62
- else
63
- options[:client_options][:authorize_path] = '/oauth/authenticate'
64
- end
65
-
66
- old_request_phase
67
- end
68
46
  end
69
47
  end
70
48
  end
@@ -1,6 +1,6 @@
1
1
  module Omniauth
2
2
  module Campus
3
- VERSION = "1.1"
3
+ VERSION = "1.2"
4
4
  end
5
5
  end
6
6
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-campus
3
3
  version: !ruby/object:Gem::Version
4
- version: '1.1'
4
+ version: '1.2'
5
5
  platform: ruby
6
6
  authors:
7
7
  - johnvehr