omniauth-clio 0.5 → 0.5.1
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.
- data/lib/omniauth-clio/version.rb +1 -1
- data/lib/omniauth/strategies/Clio.rb +1 -27
- metadata +2 -2
|
@@ -23,38 +23,12 @@ module OmniAuth
|
|
|
23
23
|
}
|
|
24
24
|
end
|
|
25
25
|
|
|
26
|
-
def authorize_params
|
|
27
|
-
super.tap do |params|
|
|
28
|
-
params[:response_type] = "code"
|
|
29
|
-
params[:client_id] = client.id
|
|
30
|
-
params[:redirect_uri] ||= callback_url
|
|
31
|
-
end
|
|
32
|
-
end
|
|
33
|
-
|
|
34
|
-
def request_phase
|
|
35
|
-
super
|
|
36
|
-
end
|
|
37
|
-
|
|
38
|
-
def build_access_token
|
|
39
|
-
token_params = {
|
|
40
|
-
:code => request.params['code'],
|
|
41
|
-
:redirect_uri => callback_url,
|
|
42
|
-
:client_id => client.id,
|
|
43
|
-
:client_secret => client.secret,
|
|
44
|
-
:grant_type => 'authorization_code'
|
|
45
|
-
}
|
|
46
|
-
client.get_token(token_params)
|
|
47
|
-
end
|
|
48
|
-
|
|
49
26
|
extra do
|
|
50
27
|
{:raw_info => raw_info}
|
|
51
28
|
end
|
|
52
29
|
|
|
53
30
|
def raw_info
|
|
54
|
-
@raw_info
|
|
55
|
-
rescue ::Errno::ETIMEDOUT
|
|
56
|
-
raise ::Timeout::Error
|
|
57
|
-
end
|
|
31
|
+
@raw_info access_token.get('/api/v1/users/who_am_i').parsed)
|
|
58
32
|
end
|
|
59
33
|
end
|
|
60
34
|
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:
|
|
4
|
+
version: 0.5.1
|
|
5
5
|
prerelease:
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2012-09-
|
|
12
|
+
date: 2012-09-23 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: multi_json
|