omniauth-prx 0.0.1 → 0.0.2

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.
@@ -1,5 +1,5 @@
1
1
  module OmniAuth
2
2
  module PRX
3
- VERSION = "0.0.1"
3
+ VERSION = "0.0.2"
4
4
  end
5
5
  end
@@ -15,12 +15,20 @@ module OmniAuth
15
15
  # additional calls (if the user id is returned with the token
16
16
  # or as a URI parameter). This may not be possible with all
17
17
  # providers.
18
- uid{ raw_info['id'] }
18
+ uid do
19
+ tmp = raw_info['uid']
20
+ # puts "uid: #{tmp}, raw:#{raw_info.inspect}"
21
+ tmp
22
+ end
19
23
 
20
24
  info do
25
+ u = raw_info['info']
21
26
  {
22
- :login => raw_info['login'],
23
- :email => raw_info['email']
27
+ :uid => raw_info['uid'],
28
+ :login => u['login'],
29
+ :email => u['email'],
30
+ :first_name => u['first_name'],
31
+ :last_name => u['last_name']
24
32
  }
25
33
  end
26
34
 
@@ -36,9 +44,9 @@ module OmniAuth
36
44
 
37
45
  def get_raw_info
38
46
  t = access_token
39
- puts "get_raw_info: access_token: #{t.inspect}"
40
- r = access_token.get('/me').parsed
41
- puts "get_raw_info: response: #{r.inspect}"
47
+ # puts "get_raw_info: access_token: #{t.inspect}"
48
+ r = access_token.get('/me', {'Accept' => 'application/json'}).parsed
49
+ # puts "get_raw_info: response: #{r.inspect}"
42
50
  r
43
51
  end
44
52
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-prx
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
4
+ hash: 27
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 1
10
- version: 0.0.1
9
+ - 2
10
+ version: 0.0.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Andrew Kuklewicz
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-12-07 00:00:00 -05:00
18
+ date: 2011-12-21 00:00:00 -05:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency