omniauth-alipay-oauth2 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: 7143e8e312f81fdc76808f6afb283235b8ecc8c7
4
- data.tar.gz: 8c00d6f27260336294feb0e8e8e372e9c6624bdc
3
+ metadata.gz: 28e6a180159ccffe5bec7047d902cf414fc8442c
4
+ data.tar.gz: 4f0d476eb63523997a82f05a5cd12bd5e5f1075c
5
5
  SHA512:
6
- metadata.gz: 3ec34555fd818e0308dcb82d1e0ad04922e4d9b455680bad0f0e433b0ee7887f711b73682adc0437290c873e0bd673ec6872f2da3e8fbb98190e82a7d8238877
7
- data.tar.gz: ec35705f78415c7c86b2c4ce5edb43bea9c1a9886d5755878d1cbec1bc8144704f3685051b3d1ce741467bf6b55c1a6c13344e764f98c7928f0335d727773c32
6
+ metadata.gz: c6b3be5772e7caa3d2ba8b8f956d1cacbb32a7faea335d06a077ecb87726cc25853e3959de0c7736bfd6be566fab302c31d4ef53c1351beec225f2e211e6ac83
7
+ data.tar.gz: 2f10c93fce6e9dfcb949c1cfab4a47187678684888f30815dbcbd87993cb8b9cac10b499d64283fe84ed510b1f7d5ee42522d8bd43cb30ef2f8e39aca893cea9
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- omniauth-alipay-oauth2 (0.1.0)
4
+ omniauth-alipay-oauth2 (0.1.1)
5
5
  alipay (~> 0.15.0)
6
6
  omniauth
7
7
  omniauth-oauth2
data/README.md CHANGED
@@ -1,6 +1,9 @@
1
- omniauth-alipay
1
+ omniauth-alipay-oauth2
2
2
  ===============
3
3
 
4
+ [![Gem Version](https://badge.fury.io/rb/omniauth-alipay-oauth2.svg)](https://badge.fury.io/rb/omniauth-alipay-oauth2)
5
+ [![Dependency Status](https://gemnasium.com/badges/github.com/FX-HAO/omniauth-alipay-oauth2.svg)](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', path: 'FX-HAO/omniauth-alipay'
18
+ gem 'omniauth-alipay-oauth2', require: 'omniauth-alipay'
16
19
  ```
17
20
 
18
21
  Then `bundle install`.
@@ -1,5 +1,5 @@
1
1
  module Omniauth
2
2
  module Alipay
3
- VERSION = "0.1.1"
3
+ VERSION = "0.1.2"
4
4
  end
5
5
  end
@@ -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.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-01 00:00:00.000000000 Z
11
+ date: 2017-12-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: omniauth