omniauth-wechat 0.1.13 → 0.1.14
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.
- checksums.yaml +8 -8
- data/lib/omniauth/strategies/wechat.rb +6 -5
- data/lib/omniauth/wechat/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
---
|
|
2
2
|
!binary "U0hBMQ==":
|
|
3
3
|
metadata.gz: !binary |-
|
|
4
|
-
|
|
4
|
+
YmY5Mjc1ZTQxYjhjNTg0ZDY2YmE4NjgwYWE4NGY2Mjg3MmQ3OGExYQ==
|
|
5
5
|
data.tar.gz: !binary |-
|
|
6
|
-
|
|
6
|
+
ZGQwMzNlYTRlOTNkYzY2YjhiZTZkYjI3ZWU0YjljNjY4MDJiOTZlYg==
|
|
7
7
|
!binary "U0hBNTEy":
|
|
8
8
|
metadata.gz: !binary |-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
ZmE2YTU4NTRjMGMwZGZjOWNmNmUwZDg0YTFlODBjNmVjODdkYWRiNzE1YjZj
|
|
10
|
+
MGU2NDBjZTE4NTc4ZDRmMGJiMjljMDU0NGU5NmNmMDAxNDE3MThiNWY2NmIz
|
|
11
|
+
N2M1ZjhiMzFjZmQ3MTIxNTQ5NjllYjVkM2QzNzg0OTMxOGViOTI=
|
|
12
12
|
data.tar.gz: !binary |-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
ZGEyODQ1ZjZhN2VmNTcwZjEyNDM5MTQ0N2I3MDQ5OWEwMTYyYmM4YTRlZTY4
|
|
14
|
+
Y2JjZGZmMzU1ZmViNzU1MTczYjgyOTExZGY5ZDU2MzJlYmY3MTE5NmQ0ODAz
|
|
15
|
+
YWYyNGMzNjUzYTQ4NjE2YjAxZjYwOWNiZWU4OWE2NTQwYTM3NzY=
|
|
@@ -19,9 +19,9 @@ module OmniAuth
|
|
|
19
19
|
option :token_options, []
|
|
20
20
|
option :auth_token_params, {}
|
|
21
21
|
option :client_options, {
|
|
22
|
-
:site => '
|
|
22
|
+
:site => 'https://api.weixin.qq.com',
|
|
23
23
|
:authorize_url => 'https://open.weixin.qq.com/connect/oauth2/authorize',
|
|
24
|
-
:token_url =>
|
|
24
|
+
:token_url => 'https://api.weixin.qq.com/sns/oauth2/access_token',
|
|
25
25
|
:token_method => :get,
|
|
26
26
|
:raise_errors => false
|
|
27
27
|
}
|
|
@@ -72,8 +72,9 @@ module OmniAuth
|
|
|
72
72
|
raise CallbackError.new('noauthorize','user cancel authorizing')
|
|
73
73
|
end
|
|
74
74
|
|
|
75
|
+
|
|
75
76
|
self.access_token = build_access_token
|
|
76
|
-
self.access_token = refresh_access_token(access_token) if access_token.expired?
|
|
77
|
+
#self.access_token = refresh_access_token(access_token) if access_token.expired?
|
|
77
78
|
super
|
|
78
79
|
rescue ::OAuth2::Error, CallbackError => e
|
|
79
80
|
fail!(:invalid_credentials, e)
|
|
@@ -134,7 +135,7 @@ module OmniAuth
|
|
|
134
135
|
:grant_type=>'authorization_code',
|
|
135
136
|
:parse=>:json
|
|
136
137
|
}
|
|
137
|
-
client.get_token(request_params
|
|
138
|
+
client.get_token(request_params)
|
|
138
139
|
|
|
139
140
|
end
|
|
140
141
|
|
|
@@ -144,7 +145,7 @@ module OmniAuth
|
|
|
144
145
|
:refresh_token => old_token.refresh_token,
|
|
145
146
|
:parse=>:json
|
|
146
147
|
}
|
|
147
|
-
client({:token_url=>'https://api.weixin.qq.com/sns/oauth2/refresh_token'}).get_token(request_params
|
|
148
|
+
client({:token_url=>'https://api.weixin.qq.com/sns/oauth2/refresh_token'}).get_token(request_params)
|
|
148
149
|
end
|
|
149
150
|
|
|
150
151
|
class CallbackError < StandardError
|