omniauth-clio 0.0.151 → 0.0.211

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,5 @@
1
1
  module OmniAuth
2
2
  module Clio
3
- VERSION = "0.0.151"
3
+ VERSION = "0.0.211"
4
4
  end
5
5
  end
@@ -12,6 +12,15 @@ module OmniAuth
12
12
  :token_url => '/oauth/token'
13
13
  }
14
14
 
15
+ uid { raw_info['id']}
16
+
17
+ info do
18
+ {
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
+ }
15
24
 
16
25
  def authorize_params
17
26
  super.tap do |params|
@@ -36,6 +45,15 @@ module OmniAuth
36
45
  client.get_token(token_params)
37
46
  end
38
47
 
48
+ extra do
49
+ {:raw_info => raw_info}
50
+ end
51
+
52
+ def raw_info
53
+ @raw_info ||= MultiJson.load(access_token.get('/api/v1/users/who_am_i').body)
54
+ rescue ::Errno::ETIMEDOUT
55
+ raise ::Timeout::Error
56
+ end
39
57
  end
40
58
  end
41
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.151
4
+ version: 0.0.211
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: