omniauth-clio 0.0.21 → 0.0.22

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 Clio
3
- VERSION = "0.0.21"
3
+ VERSION = "0.0.22"
4
4
  end
5
5
  end
@@ -12,15 +12,16 @@ module OmniAuth
12
12
  :token_url => '/oauth/token'
13
13
  }
14
14
 
15
- uid { raw_info['id']}
15
+ uid { raw_info['user']['id']}
16
16
 
17
17
  info do
18
18
  {
19
- :last_name => raw_info.parsed['user']['last_name']
20
- :first_name => raw_info.parsed['user']['first_name']
21
- :email => raw_info.parsed['user']['email']
22
- :firm => raw_info.parsed['account']['name']
19
+ :last_name => raw_info['user']['last_name'],
20
+ :first_name => raw_info['user']['first_name'],
21
+ :email => raw_info['user']['email'],
22
+ :firm => raw_info['account']['name'],
23
23
  }
24
+ end
24
25
 
25
26
  def authorize_params
26
27
  super.tap do |params|
@@ -46,12 +47,13 @@ module OmniAuth
46
47
  end
47
48
 
48
49
  extra do
49
- {:raw_info => raw_info.parsed}
50
+ {:raw_info => raw_info}
50
51
  end
51
52
 
52
53
  def raw_info
53
- access_token.options[:parse] = :json
54
- @raw_info ||= access_token.get('api/v1/users/who_am_i')
54
+ @raw_info ||= MultiJson.load(access_token.get('/api/v1/users/who_am_i').body)
55
+ rescue ::Errno::ETIMEDOUT
56
+ raise ::Timeout::Error
55
57
  end
56
58
  end
57
59
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-clio
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.21
4
+ version: 0.0.22
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: