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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 739f9aa2b225a2e01bbbe74c3bda0e3c7c29ef6a
4
- data.tar.gz: ee6b01217d5c2219017a77bf84212c73016ffcbb
3
+ metadata.gz: 8299ed896eb0e81a2d68632c1455e50dcbf9b674
4
+ data.tar.gz: a24e00d4efbff81988e7c1457aa102a3dca1816e
5
5
  SHA512:
6
- metadata.gz: f15ec8e15dc53c2583e44ac272b68d337dcbf40b4595b1d9f1d3ae79062311d716a2ce3d96ad8103996b9eae0232454fb72e8717114a3bfbaed088e7a250906f
7
- data.tar.gz: b02e9665e6fc295fb4a37a601fe827c86387ecde76733a6ac1b29b3511ed3fb87a10aa9cd184002fd1fa47e853f008e9da1ef9d54b171dc9ff9d7f0c3c6ade81
6
+ metadata.gz: 69a31ba8d12e75d1c8435d2a029b32995a69dd9dfea15abfe3f92b01d5200a4de5bb734de5972baa2f0cdf714a396bae52e21436f7b812de571d68547a6299ae
7
+ data.tar.gz: 1dc49b5c1cd33d4a03418b518710e4241926143ae7a8568e95ab731218d7ae74b885c44a9e71497ce5f67550e4bf3bbddad60d5a3dbda7b195d012a9943120c0
@@ -1,5 +1,5 @@
1
1
  module OmniAuth
2
2
  module LeanCloud
3
- VERSION = "0.1.1"
3
+ VERSION = "0.1.2"
4
4
  end
5
5
  end
@@ -9,9 +9,9 @@ module OmniAuth
9
9
  :token_url => "/1.1/token"
10
10
  }
11
11
 
12
- # option :token_params, {
13
- # :parse => :json
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
- :name => raw_info['username'],
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
- # access_token.options[:param_name] = 'access_token'
46
- # @uid ||= access_token.get('clients/self').parsed["uid"]
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-leancloud
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - paomian