omniauth-uber 0.5.0 → 1.0.0

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: 1918e142b87b2844936c6d834ba3f5b3e1cde00c
4
- data.tar.gz: 05c551329fd715a1addc2bba9668807e090c9fc5
3
+ metadata.gz: 1f22a43c0a66249118fcd6214f7c64410a1328a0
4
+ data.tar.gz: 3473232f5cac6883741e13fb8d0cc4ba861a3db9
5
5
  SHA512:
6
- metadata.gz: b6915e7f77da9e27057fdcb356c20eaeaeafedd219dfa4c2ec7638ebbd5003269d81c39835b1fefd39e846bd03ff12c5f8345e98cbf1cab21de2406f4ea03277
7
- data.tar.gz: 24a339780058b7a29e244d90f540486da4c1c6dbfa00dce87a337a58188bc1a6775186b5d09a055fc953aa722012a95e093ba23a90d2056936a6596e3bfca612
6
+ metadata.gz: 9ac969f83998390d008f534840dfd760092abb811386c42245a019debffc3183aa1f6549798224e5a6cb1ccd0df4d6319ba4fee0b071f730ca1d64089f0e0091
7
+ data.tar.gz: ce9032112ec1fcb2897a05b230fed88350eda89a10039679766979cfd769db4ab2c923ef2732fa2b1fe7c7c4d89853fe27b62254d8d8c3ed81a8cecd136a8aae
@@ -5,24 +5,28 @@ module OmniAuth
5
5
  class Uber < OmniAuth::Strategies::OAuth2
6
6
  DEFAULT_SCOPE = 'profile'
7
7
 
8
- option :client_options, :site => 'https://login.uber.com',
9
- :authorize_url => '/oauth/authorize',
10
- :token_url => '/oauth/token'
8
+ option :client_options, :site => 'https://api.uber.com',
9
+ :authorize_url => 'https://login.uber.com/oauth/authorize',
10
+ :token_url => 'https://login.uber.com/oauth/token'
11
11
 
12
- uid { nil }
12
+ uid { raw_info['uuid'] }
13
13
 
14
14
  info do
15
- # Not implemented yet
16
- {}
15
+ {
16
+ :first_name => raw_info['first_name'],
17
+ :last_name => raw_info['last_name'],
18
+ :email => raw_info['email'],
19
+ :picture => raw_info['picture'],
20
+ :promo_code => raw_info['promo_code']
21
+ }
17
22
  end
18
23
 
19
24
  extra do
20
- # Not implemented yet
21
- {}
25
+ { :raw_info => raw_info }
22
26
  end
23
27
 
24
28
  def raw_info
25
- @raw_info ||= access_token.params['user'] || {}
29
+ @raw_info ||= access_token.get("/v1/me").parsed || {}
26
30
  end
27
31
 
28
32
  def request_phase
@@ -1,5 +1,5 @@
1
1
  module OmniAuth
2
2
  module Uber
3
- VERSION = '0.5.0'
3
+ VERSION = '1.0.0'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-uber
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tom Milewski