omniauth-wechat-oauth2 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/omniauth/strategies/wechat.rb +4 -6
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f2db2a6ffccd120dc2aea814ea578ac393d9489dbc6c9a464b3e6b89f4840739
|
4
|
+
data.tar.gz: 4f2b9269d515f278d52eae8f66b2ebc2442730a6293a123e7cb27704f5c45294
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c26fac5621c86fb639866d329ed5c3a34791a542c3bd47ebe5a60e8cdf1ef7d9b82590273142c1d3e852fefa4f8e50f64126ae42992044ed512bff3e3d8f00ee
|
7
|
+
data.tar.gz: 6443a43f47bc03cb1579e27ec555bce0014c22b74ac9e81612ac5d197e7068612766b3139c69de0397839d437e6c77e0a113e507a3dccddb9040bb83631c4a12
|
@@ -50,15 +50,13 @@ module OmniAuth
|
|
50
50
|
@uid ||= access_token["openid"]
|
51
51
|
@raw_info ||= begin
|
52
52
|
access_token.options[:mode] = :query
|
53
|
-
if access_token["scope"]
|
54
|
-
|
55
|
-
@raw_info = JSON.parse(response.body.gsub(/[\u0000-\u001f]+/, ''))
|
53
|
+
if access_token["scope"]&.include?("snsapi_login")
|
54
|
+
access_token.get("/sns/userinfo", :params => { "openid" => @uid, "lang" => "zh_CN" }, parse: :json).parsed
|
56
55
|
else
|
57
|
-
|
58
|
-
@raw_info.merge!("unionid" => access_token["unionid"]) if access_token["unionid"]
|
59
|
-
@raw_info
|
56
|
+
{ "openid" => @uid }
|
60
57
|
end
|
61
58
|
end
|
59
|
+
@raw_info
|
62
60
|
end
|
63
61
|
|
64
62
|
protected
|
metadata
CHANGED
@@ -1,16 +1,16 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omniauth-wechat-oauth2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alex Hu
|
8
8
|
- Never Min
|
9
9
|
- Eric Guo
|
10
|
-
autorequire:
|
10
|
+
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date:
|
13
|
+
date: 2020-06-09 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: omniauth
|
@@ -72,7 +72,7 @@ homepage: https://github.com/nevermin/omniauth-wechat-oauth2
|
|
72
72
|
licenses:
|
73
73
|
- MIT
|
74
74
|
metadata: {}
|
75
|
-
post_install_message:
|
75
|
+
post_install_message:
|
76
76
|
rdoc_options: []
|
77
77
|
require_paths:
|
78
78
|
- lib
|
@@ -80,7 +80,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
80
80
|
requirements:
|
81
81
|
- - ">="
|
82
82
|
- !ruby/object:Gem::Version
|
83
|
-
version: 2.
|
83
|
+
version: 2.3.0
|
84
84
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
85
85
|
requirements:
|
86
86
|
- - ">="
|
@@ -88,8 +88,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
88
88
|
version: '0'
|
89
89
|
requirements:
|
90
90
|
- none
|
91
|
-
rubygems_version: 3.
|
92
|
-
signing_key:
|
91
|
+
rubygems_version: 3.1.4
|
92
|
+
signing_key:
|
93
93
|
specification_version: 4
|
94
94
|
summary: Omniauth strategy for wechat(weixin)
|
95
95
|
test_files: []
|