omniauth-alipay-oauth2 0.1.1 → 0.1.2
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 +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +5 -2
- data/lib/omniauth-alipay/version.rb +1 -1
- data/lib/omniauth/strategies/alipay.rb +4 -2
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 28e6a180159ccffe5bec7047d902cf414fc8442c
|
|
4
|
+
data.tar.gz: 4f0d476eb63523997a82f05a5cd12bd5e5f1075c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c6b3be5772e7caa3d2ba8b8f956d1cacbb32a7faea335d06a077ecb87726cc25853e3959de0c7736bfd6be566fab302c31d4ef53c1351beec225f2e211e6ac83
|
|
7
|
+
data.tar.gz: 2f10c93fce6e9dfcb949c1cfab4a47187678684888f30815dbcbd87993cb8b9cac10b499d64283fe84ed510b1f7d5ee42522d8bd43cb30ef2f8e39aca893cea9
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
omniauth-alipay
|
|
1
|
+
omniauth-alipay-oauth2
|
|
2
2
|
===============
|
|
3
3
|
|
|
4
|
+
[](https://badge.fury.io/rb/omniauth-alipay-oauth2)
|
|
5
|
+
[](https://gemnasium.com/github.com/FX-HAO/omniauth-alipay-oauth2)
|
|
6
|
+
|
|
4
7
|
Alipay OAuth2 Strategy for OmniAuth.
|
|
5
8
|
|
|
6
9
|
Support connecting Alipay account to third-party APP and website.
|
|
@@ -12,7 +15,7 @@ Read the Alipay docs for more details:
|
|
|
12
15
|
Add to your `Gemfile`:
|
|
13
16
|
|
|
14
17
|
```ruby
|
|
15
|
-
gem 'omniauth-alipay',
|
|
18
|
+
gem 'omniauth-alipay-oauth2', require: 'omniauth-alipay'
|
|
16
19
|
```
|
|
17
20
|
|
|
18
21
|
Then `bundle install`.
|
|
@@ -31,6 +31,10 @@ module OmniAuth
|
|
|
31
31
|
option :app_private_key, nil
|
|
32
32
|
option :alipay_public_key, nil
|
|
33
33
|
|
|
34
|
+
option :authorize_params, {scope: 'auth_user', state: 'init'}
|
|
35
|
+
|
|
36
|
+
option :token_params, {parse: :json}
|
|
37
|
+
|
|
34
38
|
option :client_options, {
|
|
35
39
|
authorize_url: 'https://openauth.alipay.com/oauth2/publicAppAuthorize.htm',
|
|
36
40
|
token_url: 'https://openauth.alipay.com/oauth2/token',
|
|
@@ -61,8 +65,6 @@ module OmniAuth
|
|
|
61
65
|
def request_phase
|
|
62
66
|
params = client.auth_code.authorize_params.merge(redirect_uri: callback_url).merge(authorize_params)
|
|
63
67
|
params['app_id'] = params.delete('client_id')
|
|
64
|
-
params['scope'] = 'auth_user'
|
|
65
|
-
params['state'] = 'init'
|
|
66
68
|
params.delete('response_type')
|
|
67
69
|
redirect client.authorize_url(params)
|
|
68
70
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: omniauth-alipay-oauth2
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Fuxin Hao
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2017-12-
|
|
11
|
+
date: 2017-12-20 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: omniauth
|