omniauth-eleme-oauth2 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +6 -5
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 85a2ea7087ccf8244351b669a74e0a03b34fd520
|
4
|
+
data.tar.gz: 76048a166737a09dcc6ecbf6d2f36c681df94555
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 56bb3c23a56a9c0c8f197bec403ae21ce8c56213278b24da04cd1591efb47b0d9adc1d16d0e391b70bd60a46e3e03acc112465c2ff7f85bac1576966001b4674
|
7
|
+
data.tar.gz: 4a5b4aa4b7ef87082468859ac1f7b0f25d510ba01617c83882106d512e6aa34256e2152bad84291a51cede0dd00a960a5d7db9954d5dd7c18b2f9c3459538e03
|
data/README.md
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
Omniauth-eleme-oauth2
|
2
2
|
======================
|
3
3
|
|
4
|
-
|
4
|
+
Eleme OAuth2 Strategy for OmniAuth 1.0.
|
5
5
|
|
6
6
|
You need to get a eleme API key at: https://open.shop.ele.me/
|
7
7
|
|
8
|
-
|
8
|
+
Eleme oauth2 specification can be found at: https://open.shop.ele.me/openapi/documents/oauth
|
9
9
|
|
10
10
|
## Installation
|
11
11
|
|
@@ -28,14 +28,12 @@ Rails.application.config.middleware.use OmniAuth::Builder do
|
|
28
28
|
end
|
29
29
|
```
|
30
30
|
|
31
|
-
You can now access the OmniAuth
|
31
|
+
You can now access the OmniAuth Eleme OAuth2 URL: `/auth/eleme`
|
32
32
|
|
33
33
|
## Configuration
|
34
34
|
|
35
35
|
You can configure several options, which you pass in to the `provider` method via a hash:
|
36
36
|
|
37
|
-
* `scope`: Default is "snsapi_userinfo". It can either be *snsapi_base* or *snsapi_userinfo*. When scope is "snsapi_userinfo", after eleme user is authenticated, app can query userinfo using the acquired access_token.
|
38
|
-
|
39
37
|
For devise user, you can set up scope in your devise.rb as following.
|
40
38
|
|
41
39
|
```ruby
|
@@ -64,8 +62,11 @@ Here's an example of an authentication hash available in the callback by accessi
|
|
64
62
|
|
65
63
|
Also, you may need params from redirect_uri. e.g. if you access http://localhost:3000/auth/eleme?branch_id=25. Here's an example of an parameter hash available in the callback by accessing `request.env["omniauth.params"]`.:
|
66
64
|
|
65
|
+
```
|
67
66
|
{
|
68
67
|
branch_id: 25
|
69
68
|
}
|
69
|
+
```
|
70
70
|
|
71
|
+
If you have any question about this gem, please contact me by email (xie_s@isumeng.com) or wechat(微信号:wanxsb)
|
71
72
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omniauth-eleme-oauth2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- neil
|
@@ -52,8 +52,7 @@ dependencies:
|
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '3.0'
|
55
|
-
description:
|
56
|
-
viewed
|
55
|
+
description: "饿了么商家平台 OAuth2.0 对接开发"
|
57
56
|
email:
|
58
57
|
- wanxsb@gmail.com
|
59
58
|
executables: []
|
@@ -63,7 +62,7 @@ files:
|
|
63
62
|
- README.md
|
64
63
|
- lib/omniauth-eleme-oauth2.rb
|
65
64
|
- lib/omniauth/strategies/eleme.rb
|
66
|
-
homepage:
|
65
|
+
homepage: https://github.com/360pinmi/omniauth-eleme-oauth2
|
67
66
|
licenses: []
|
68
67
|
metadata: {}
|
69
68
|
post_install_message:
|