omniauth-leancloud 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/omniauth-leancloud/version.rb +1 -1
- data/lib/omniauth/strategies/leancloud.rb +6 -17
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8299ed896eb0e81a2d68632c1455e50dcbf9b674
|
4
|
+
data.tar.gz: a24e00d4efbff81988e7c1457aa102a3dca1816e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 69a31ba8d12e75d1c8435d2a029b32995a69dd9dfea15abfe3f92b01d5200a4de5bb734de5972baa2f0cdf714a396bae52e21436f7b812de571d68547a6299ae
|
7
|
+
data.tar.gz: 1dc49b5c1cd33d4a03418b518710e4241926143ae7a8568e95ab731218d7ae74b885c44a9e71497ce5f67550e4bf3bbddad60d5a3dbda7b195d012a9943120c0
|
@@ -9,9 +9,9 @@ module OmniAuth
|
|
9
9
|
:token_url => "/1.1/token"
|
10
10
|
}
|
11
11
|
|
12
|
-
|
13
|
-
|
14
|
-
|
12
|
+
option :token_params, {
|
13
|
+
:parse => :json
|
14
|
+
}
|
15
15
|
|
16
16
|
uid do
|
17
17
|
raw_info['id']
|
@@ -19,7 +19,7 @@ module OmniAuth
|
|
19
19
|
|
20
20
|
info do
|
21
21
|
{
|
22
|
-
:
|
22
|
+
:username => raw_info['username'],
|
23
23
|
:email => raw_info['email']
|
24
24
|
}
|
25
25
|
end
|
@@ -30,21 +30,10 @@ module OmniAuth
|
|
30
30
|
}
|
31
31
|
end
|
32
32
|
|
33
|
-
def authorize_params
|
34
|
-
super.tap do |params|
|
35
|
-
%w[scope client_options].each do |v|
|
36
|
-
if request.params[v]
|
37
|
-
params[v.to_sym] = request.params[v]
|
38
|
-
end
|
39
|
-
end
|
40
|
-
end
|
41
|
-
end
|
42
|
-
|
43
33
|
def raw_info
|
44
34
|
access_token.options[:mode] = :query
|
45
|
-
|
46
|
-
|
47
|
-
@raw_info ||= access_token.get("/clients/self").parsed
|
35
|
+
access_token.options[:param_name] = 'access_token'
|
36
|
+
@raw_info ||= access_token.get("https://leancloud.cn/1.1/open/clients/self").parsed
|
48
37
|
end
|
49
38
|
end
|
50
39
|
end
|