omniauth-synced 1.0.0
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 +7 -0
- data/.gitignore +1 -0
- data/.ruby-version +1 -0
- data/Gemfile +11 -0
- data/Gemfile.lock +129 -0
- data/Guardfile +32 -0
- data/README.md +22 -0
- data/Rakefile +6 -0
- data/bin/console +7 -0
- data/bin/setup +8 -0
- data/lib/omniauth/strategies/synced.rb +33 -0
- data/lib/omniauth/strategies/wechat.rb +79 -0
- data/lib/omniauth/strategies/wechat_service.rb +94 -0
- data/lib/omniauth/strategies/weibo.rb +36 -0
- data/lib/omniauth-synced/version.rb +5 -0
- data/lib/omniauth-synced.rb +7 -0
- data/lib/patch/omniauth-oauth2.rb +24 -0
- data/omniauth-synced.gemspec +28 -0
- metadata +150 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 7f56aa785778837804b8eaa3dc94b4346306471deae548d1ce10ac09ffd506b1
|
4
|
+
data.tar.gz: 20e1120ed5e396084344c924bdd54043a9452e8438ab64ebff84c2623a580cfb
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 993b04d1e987d53491f823b35b60375bbaa8a5ad3b76b45bdb521f4897fb3b2460981cb6aa54a9c7235be74958cf19a747de8851e39390ede769fb2adef2195f
|
7
|
+
data.tar.gz: 331ecee9e84b398c43ce605d5a9f4f0a28b3cd018ef2efeae4a659fe665d4834d73ed6ebab6b50bfa2aab71e09a3cb789066eda6c015ee61e0852123aada450f
|
data/.gitignore
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
*.gem
|
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
2.7.8
|
data/Gemfile
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
source 'https://gems.ruby-china.com'
|
2
|
+
# Specify your gem's dependencies in omniauth-geekpark.gemspec
|
3
|
+
gemspec
|
4
|
+
|
5
|
+
group :development, :test do
|
6
|
+
gem 'guard-rspec', require: false
|
7
|
+
end
|
8
|
+
|
9
|
+
group :test do
|
10
|
+
gem 'codeclimate-test-reporter', require: false
|
11
|
+
end
|
data/Gemfile.lock
ADDED
@@ -0,0 +1,129 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
omniauth-synced (1.0.0)
|
5
|
+
omniauth (~> 1.0)
|
6
|
+
omniauth-oauth2 (~> 1.4)
|
7
|
+
|
8
|
+
GEM
|
9
|
+
remote: https://gems.ruby-china.com/
|
10
|
+
specs:
|
11
|
+
addressable (2.8.7)
|
12
|
+
public_suffix (>= 2.0.2, < 7.0)
|
13
|
+
base64 (0.2.0)
|
14
|
+
bigdecimal (3.1.9)
|
15
|
+
codeclimate-test-reporter (1.0.9)
|
16
|
+
simplecov (<= 0.13)
|
17
|
+
coderay (1.1.3)
|
18
|
+
crack (1.0.0)
|
19
|
+
bigdecimal
|
20
|
+
rexml
|
21
|
+
diff-lcs (1.6.0)
|
22
|
+
docile (1.1.5)
|
23
|
+
faraday (2.8.1)
|
24
|
+
base64
|
25
|
+
faraday-net_http (>= 2.0, < 3.1)
|
26
|
+
ruby2_keywords (>= 0.0.4)
|
27
|
+
faraday-net_http (3.0.2)
|
28
|
+
ffi (1.17.1)
|
29
|
+
formatador (1.1.0)
|
30
|
+
guard (2.19.1)
|
31
|
+
formatador (>= 0.2.4)
|
32
|
+
listen (>= 2.7, < 4.0)
|
33
|
+
logger (~> 1.6)
|
34
|
+
lumberjack (>= 1.0.12, < 2.0)
|
35
|
+
nenv (~> 0.1)
|
36
|
+
notiffany (~> 0.0)
|
37
|
+
ostruct (~> 0.6)
|
38
|
+
pry (>= 0.13.0)
|
39
|
+
shellany (~> 0.0)
|
40
|
+
thor (>= 0.18.1)
|
41
|
+
guard-compat (1.2.1)
|
42
|
+
guard-rspec (4.7.3)
|
43
|
+
guard (~> 2.1)
|
44
|
+
guard-compat (~> 1.1)
|
45
|
+
rspec (>= 2.99.0, < 4.0)
|
46
|
+
hashdiff (1.1.2)
|
47
|
+
hashie (5.0.0)
|
48
|
+
json (2.10.1)
|
49
|
+
jwt (2.10.1)
|
50
|
+
base64
|
51
|
+
listen (3.9.0)
|
52
|
+
rb-fsevent (~> 0.10, >= 0.10.3)
|
53
|
+
rb-inotify (~> 0.9, >= 0.9.10)
|
54
|
+
logger (1.6.6)
|
55
|
+
lumberjack (1.2.10)
|
56
|
+
method_source (1.1.0)
|
57
|
+
multi_xml (0.6.0)
|
58
|
+
nenv (0.3.0)
|
59
|
+
notiffany (0.1.3)
|
60
|
+
nenv (~> 0.1)
|
61
|
+
shellany (~> 0.0)
|
62
|
+
oauth2 (2.0.9)
|
63
|
+
faraday (>= 0.17.3, < 3.0)
|
64
|
+
jwt (>= 1.0, < 3.0)
|
65
|
+
multi_xml (~> 0.5)
|
66
|
+
rack (>= 1.2, < 4)
|
67
|
+
snaky_hash (~> 2.0)
|
68
|
+
version_gem (~> 1.1)
|
69
|
+
omniauth (1.9.2)
|
70
|
+
hashie (>= 3.4.6)
|
71
|
+
rack (>= 1.6.2, < 3)
|
72
|
+
omniauth-oauth2 (1.7.3)
|
73
|
+
oauth2 (>= 1.4, < 3)
|
74
|
+
omniauth (>= 1.9, < 3)
|
75
|
+
ostruct (0.6.1)
|
76
|
+
pry (0.15.2)
|
77
|
+
coderay (~> 1.1)
|
78
|
+
method_source (~> 1.0)
|
79
|
+
public_suffix (5.1.1)
|
80
|
+
rack (2.2.12)
|
81
|
+
rake (13.2.1)
|
82
|
+
rb-fsevent (0.11.2)
|
83
|
+
rb-inotify (0.11.1)
|
84
|
+
ffi (~> 1.0)
|
85
|
+
rexml (3.4.1)
|
86
|
+
rspec (3.13.0)
|
87
|
+
rspec-core (~> 3.13.0)
|
88
|
+
rspec-expectations (~> 3.13.0)
|
89
|
+
rspec-mocks (~> 3.13.0)
|
90
|
+
rspec-core (3.13.3)
|
91
|
+
rspec-support (~> 3.13.0)
|
92
|
+
rspec-expectations (3.13.3)
|
93
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
94
|
+
rspec-support (~> 3.13.0)
|
95
|
+
rspec-mocks (3.13.2)
|
96
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
97
|
+
rspec-support (~> 3.13.0)
|
98
|
+
rspec-support (3.13.2)
|
99
|
+
ruby2_keywords (0.0.5)
|
100
|
+
shellany (0.0.1)
|
101
|
+
simplecov (0.13.0)
|
102
|
+
docile (~> 1.1.0)
|
103
|
+
json (>= 1.8, < 3)
|
104
|
+
simplecov-html (~> 0.10.0)
|
105
|
+
simplecov-html (0.10.2)
|
106
|
+
snaky_hash (2.0.1)
|
107
|
+
hashie
|
108
|
+
version_gem (~> 1.1, >= 1.1.1)
|
109
|
+
thor (1.3.2)
|
110
|
+
version_gem (1.1.6)
|
111
|
+
webmock (1.24.6)
|
112
|
+
addressable (>= 2.3.6)
|
113
|
+
crack (>= 0.3.2)
|
114
|
+
hashdiff
|
115
|
+
|
116
|
+
PLATFORMS
|
117
|
+
ruby
|
118
|
+
|
119
|
+
DEPENDENCIES
|
120
|
+
bundler (~> 2.1)
|
121
|
+
codeclimate-test-reporter
|
122
|
+
guard-rspec
|
123
|
+
omniauth-synced!
|
124
|
+
rake (~> 13.0)
|
125
|
+
rspec (~> 3.0)
|
126
|
+
webmock (~> 1.24, >= 1.24.2)
|
127
|
+
|
128
|
+
BUNDLED WITH
|
129
|
+
2.1.4
|
data/Guardfile
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
|
2
|
+
|
3
|
+
# Note: The cmd option is now required due to the increasing number of ways
|
4
|
+
# rspec may be run, below are examples of the most common uses.
|
5
|
+
# * bundler: 'bundle exec rspec'
|
6
|
+
# * bundler binstubs: 'bin/rspec'
|
7
|
+
# * spring: 'bin/rspec' (This will use spring if running and you have
|
8
|
+
# installed the spring binstubs per the docs)
|
9
|
+
# * zeus: 'zeus rspec' (requires the server to be started separately)
|
10
|
+
# * 'just' rspec: 'rspec'
|
11
|
+
|
12
|
+
guard :rspec, cmd: "bundle exec rspec" do
|
13
|
+
require "guard/rspec/dsl"
|
14
|
+
dsl = Guard::RSpec::Dsl.new(self)
|
15
|
+
|
16
|
+
# Feel free to open issues for suggestions and improvements
|
17
|
+
|
18
|
+
# RSpec files
|
19
|
+
rspec = dsl.rspec
|
20
|
+
watch(rspec.spec_helper) { rspec.spec_dir }
|
21
|
+
watch(rspec.spec_support) { rspec.spec_dir }
|
22
|
+
watch(rspec.spec_files)
|
23
|
+
|
24
|
+
# Ruby files
|
25
|
+
ruby = dsl.ruby
|
26
|
+
dsl.watch_spec_files_for(ruby.lib_files)
|
27
|
+
|
28
|
+
# Gem files
|
29
|
+
watch(%r{^spec/.+_spec\.rb$})
|
30
|
+
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
|
31
|
+
watch('spec/spec_helper.rb') { "spec" }
|
32
|
+
end
|
data/README.md
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
## OmniAuth SYNCED
|
2
|
+
|
3
|
+
This is the official OmniAuth strategy for authenticating to SYNCED.
|
4
|
+
|
5
|
+
## Usage
|
6
|
+
```
|
7
|
+
use OmniAuth::Builder do
|
8
|
+
provider :synced, ENV['SYNCED_KEY'], ENV['SYNCED_SECRET']
|
9
|
+
end
|
10
|
+
```
|
11
|
+
### Change the client options
|
12
|
+
```
|
13
|
+
use OmniAuth::Builder do
|
14
|
+
provider :synced, ENV['SYNCED_KEY'], ENV['SYNCED_SECRET'], {
|
15
|
+
client_options: {
|
16
|
+
site: 'YOUR_SITE_ADDRESS',
|
17
|
+
authorize_url: 'YOUR_AUTHORIZE_URL',
|
18
|
+
token_url: 'YOUR_TOKEN_URL'
|
19
|
+
}
|
20
|
+
}
|
21
|
+
end
|
22
|
+
```
|
data/Rakefile
ADDED
data/bin/console
ADDED
data/bin/setup
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
module OmniAuth
|
2
|
+
module Strategies
|
3
|
+
class Synced < OmniAuth::Strategies::OAuth2
|
4
|
+
option :client_options, {
|
5
|
+
site: 'https://www.jiqizhixin.com/',
|
6
|
+
authorize_url: '/oauth/authorize',
|
7
|
+
token_url: '/oauth/token'
|
8
|
+
}
|
9
|
+
|
10
|
+
uid { raw_info['id'] }
|
11
|
+
|
12
|
+
info do
|
13
|
+
{
|
14
|
+
username: raw_info['username'],
|
15
|
+
nickname: raw_info['name'],
|
16
|
+
avatar: raw_info['avatar'],
|
17
|
+
email: raw_info['email'],
|
18
|
+
mobile: raw_info['mobile'],
|
19
|
+
bio: raw_info['bio'],
|
20
|
+
verify_mobile: raw_info['verify_mobile'],
|
21
|
+
pubinfo: raw_info['pubinfo'],
|
22
|
+
union_id: raw_info['unionid']
|
23
|
+
}
|
24
|
+
end
|
25
|
+
|
26
|
+
def raw_info
|
27
|
+
@raw_info ||= access_token.get('/api/v3/user').parsed
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
OmniAuth.config.add_camelization 'synced', 'Synced'
|
@@ -0,0 +1,79 @@
|
|
1
|
+
module OmniAuth
|
2
|
+
module Strategies
|
3
|
+
class WeChat < OmniAuth::Strategies::OAuth2
|
4
|
+
option :client_options, {
|
5
|
+
site: 'https://api.weixin.qq.com',
|
6
|
+
authorize_url: 'https://open.weixin.qq.com/connect/qrconnect',
|
7
|
+
token_url: 'https://api.weixin.qq.com/sns/oauth2/access_token',
|
8
|
+
}
|
9
|
+
|
10
|
+
option :provider_ignores_state, true
|
11
|
+
|
12
|
+
uid { raw_info['unionid'] }
|
13
|
+
|
14
|
+
info do
|
15
|
+
{
|
16
|
+
nickname: raw_info['nickname'],
|
17
|
+
city: raw_info['city'],
|
18
|
+
avatar: raw_info['headimgurl']
|
19
|
+
}
|
20
|
+
end
|
21
|
+
|
22
|
+
def raw_info
|
23
|
+
@raw_info ||= begin
|
24
|
+
response = access_token.get(
|
25
|
+
'/sns/userinfo',
|
26
|
+
{ params: { access_token: access_token.token,
|
27
|
+
openid: access_token['openid'],
|
28
|
+
lang: 'zh-CN' },
|
29
|
+
parse: :json }
|
30
|
+
).parsed
|
31
|
+
log :debug, response
|
32
|
+
response
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
def request_phase
|
37
|
+
redirect client.authorize_url(authorize_params)+'#wechat_redirect'
|
38
|
+
end
|
39
|
+
|
40
|
+
def authorize_params
|
41
|
+
params = options.authorize_params.merge({
|
42
|
+
appid: options.client_id,
|
43
|
+
redirect_uri: callback_url,
|
44
|
+
response_type: 'code',
|
45
|
+
scope: request.params['scope'] || 'snsapi_login',
|
46
|
+
})
|
47
|
+
if OmniAuth.config.test_mode
|
48
|
+
@env ||= {}
|
49
|
+
@env["rack.session"] ||= {}
|
50
|
+
end
|
51
|
+
unless options.provider_ignores_state
|
52
|
+
params[:state] = SecureRandom.hex(24)
|
53
|
+
session["omniauth.state"] = params[:state]
|
54
|
+
end
|
55
|
+
params
|
56
|
+
end
|
57
|
+
|
58
|
+
def token_params
|
59
|
+
{ appid: options.client_id, secret: options.client_secret }
|
60
|
+
end
|
61
|
+
|
62
|
+
protected
|
63
|
+
|
64
|
+
def build_access_token
|
65
|
+
request_params = {
|
66
|
+
appid: options.client_id,
|
67
|
+
secret: options.client_secret,
|
68
|
+
code: request.params['code'],
|
69
|
+
grant_type: 'authorization_code',
|
70
|
+
parse: :json
|
71
|
+
}
|
72
|
+
client.get_token(request_params, {mode: :query})
|
73
|
+
end
|
74
|
+
|
75
|
+
end
|
76
|
+
end
|
77
|
+
end
|
78
|
+
|
79
|
+
OmniAuth.config.add_camelization('wechat', 'WeChat')
|
@@ -0,0 +1,94 @@
|
|
1
|
+
module OmniAuth
|
2
|
+
module Strategies
|
3
|
+
class WeChatService < OmniAuth::Strategies::OAuth2
|
4
|
+
option :client_options, {
|
5
|
+
site: 'https://api.weixin.qq.com',
|
6
|
+
authorize_url: 'https://open.weixin.qq.com/connect/oauth2/authorize',
|
7
|
+
token_url: 'https://api.weixin.qq.com/sns/oauth2/access_token',
|
8
|
+
}
|
9
|
+
|
10
|
+
option :provider_ignores_state, true
|
11
|
+
|
12
|
+
uid { raw_info['unionid'] }
|
13
|
+
|
14
|
+
info do
|
15
|
+
{
|
16
|
+
nickname: raw_info['nickname'],
|
17
|
+
city: raw_info['city'],
|
18
|
+
avatar: raw_info['headimgurl'],
|
19
|
+
openid: access_token['openid']
|
20
|
+
}
|
21
|
+
end
|
22
|
+
|
23
|
+
def raw_info
|
24
|
+
@raw_info ||= begin
|
25
|
+
response = access_token.get(
|
26
|
+
'/sns/userinfo',
|
27
|
+
{ params: { access_token: access_token.token,
|
28
|
+
openid: access_token['openid'],
|
29
|
+
lang: 'zh-CN' },
|
30
|
+
parse: :json }
|
31
|
+
).parsed
|
32
|
+
log :debug, response
|
33
|
+
response
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
def request_phase
|
38
|
+
redirect client.authorize_url(authorize_params)+'#wechat_redirect'
|
39
|
+
end
|
40
|
+
|
41
|
+
def authorize_params
|
42
|
+
params = options.authorize_params.merge({
|
43
|
+
appid: options.client_id,
|
44
|
+
redirect_uri: callback_url,
|
45
|
+
response_type: 'code',
|
46
|
+
state: request.params['state'],
|
47
|
+
scope: request.params['scope'] || 'snsapi_userinfo'
|
48
|
+
})
|
49
|
+
if OmniAuth.config.test_mode
|
50
|
+
@env ||= {}
|
51
|
+
@env["rack.session"] ||= {}
|
52
|
+
end
|
53
|
+
unless options.provider_ignores_state
|
54
|
+
params[:state] = SecureRandom.hex(24)
|
55
|
+
session["omniauth.state"] = params[:state]
|
56
|
+
end
|
57
|
+
params
|
58
|
+
end
|
59
|
+
|
60
|
+
def token_params
|
61
|
+
{ appid: options.client_id, secret: options.client_secret }
|
62
|
+
end
|
63
|
+
|
64
|
+
def callback_phase
|
65
|
+
# 其它 app 需要获取微信openid 时,将 callbackurl 传入 state 参数
|
66
|
+
if request.params['state'].match(/\Ahttps?:\/\/(.*\.)?geekpark\.net\/.*\z/)
|
67
|
+
uri = URI(request.params['state'])
|
68
|
+
query = Rack::Utils.parse_nested_query(uri.query).merge(code: request.params['code'])
|
69
|
+
uri.query = URI.encode_www_form query
|
70
|
+
env['omniauth.redirect'] = uri.to_s
|
71
|
+
call_app!
|
72
|
+
else
|
73
|
+
super
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
77
|
+
protected
|
78
|
+
|
79
|
+
def build_access_token
|
80
|
+
request_params = {
|
81
|
+
appid: options.client_id,
|
82
|
+
secret: options.client_secret,
|
83
|
+
code: request.params['code'],
|
84
|
+
grant_type: 'authorization_code',
|
85
|
+
parse: :json
|
86
|
+
}
|
87
|
+
client.get_token(request_params, {mode: :query})
|
88
|
+
end
|
89
|
+
|
90
|
+
end
|
91
|
+
end
|
92
|
+
end
|
93
|
+
|
94
|
+
OmniAuth.config.add_camelization('wechatservice', 'WeChatService')
|
@@ -0,0 +1,36 @@
|
|
1
|
+
module OmniAuth
|
2
|
+
module Strategies
|
3
|
+
class Weibo < OmniAuth::Strategies::OAuth2
|
4
|
+
option :client_options, {
|
5
|
+
site: "https://api.weibo.com",
|
6
|
+
authorize_url: "/oauth2/authorize",
|
7
|
+
token_url: "/oauth2/access_token",
|
8
|
+
}
|
9
|
+
|
10
|
+
option :token_params, parse: :json
|
11
|
+
|
12
|
+
uid { raw_info['id'] }
|
13
|
+
|
14
|
+
info do
|
15
|
+
{
|
16
|
+
nickname: raw_info['screen_name'],
|
17
|
+
avatar: raw_info['avatar_large'],
|
18
|
+
bio: raw_info['description']
|
19
|
+
}
|
20
|
+
end
|
21
|
+
|
22
|
+
extra do { raw_info: raw_info } end
|
23
|
+
|
24
|
+
def raw_info
|
25
|
+
@uid ||= begin
|
26
|
+
access_token.options[:mode] = :query
|
27
|
+
access_token.get('/2/account/get_uid.json').parsed["uid"]
|
28
|
+
end
|
29
|
+
|
30
|
+
@raw_info ||= access_token.get('/2/users/show.json', params: {uid: @uid}).parsed
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
OmniAuth.config.add_camelization "weibo", "Weibo"
|
@@ -0,0 +1,24 @@
|
|
1
|
+
class OmniAuth::Strategies::OAuth2
|
2
|
+
def callback_phase # rubocop:disable AbcSize, CyclomaticComplexity, MethodLength, PerceivedComplexity
|
3
|
+
error = request.params["error_reason"] || request.params["error"]
|
4
|
+
if error
|
5
|
+
fail!(error, CallbackError.new(request.params["error"], request.params["error_description"] || request.params["error_reason"], request.params["error_uri"]))
|
6
|
+
elsif !options.provider_ignores_state && (request.params["state"].to_s.empty? || request.params["state"] != session.delete("omniauth.state"))
|
7
|
+
fail!(:csrf_detected, CallbackError.new(:csrf_detected, "CSRF detected"))
|
8
|
+
else
|
9
|
+
self.access_token = build_access_token
|
10
|
+
fail!(:token_expired, CallbackError.new(:token_expired,'Token has expired, refresh and try again.')) if access_token.expired?
|
11
|
+
super
|
12
|
+
end
|
13
|
+
rescue ::OAuth2::Error, CallbackError => e
|
14
|
+
fail!(:invalid_credentials, e)
|
15
|
+
rescue ::Timeout::Error, ::Errno::ETIMEDOUT => e
|
16
|
+
fail!(:timeout, e)
|
17
|
+
rescue ::SocketError => e
|
18
|
+
fail!(:failed_to_connect, e)
|
19
|
+
end
|
20
|
+
|
21
|
+
def callback_url
|
22
|
+
full_host + script_name + callback_path
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'omniauth-synced/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = 'omniauth-synced'
|
8
|
+
spec.version = OmniAuth::Synced::VERSION
|
9
|
+
spec.authors = %w(waynels)
|
10
|
+
spec.email = ["clover_0304@163.com"]
|
11
|
+
|
12
|
+
spec.summary = %q{ OmniAuth strategies for synced. Includes synced, weibo and wechat. }
|
13
|
+
spec.description = %q{ Official OmniAuth strategies for synced. }
|
14
|
+
spec.homepage = "https://github.com/SyncedPSI/omniauth-synced"
|
15
|
+
spec.license = "MIT"
|
16
|
+
|
17
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
18
|
+
spec.bindir = "exe"
|
19
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
20
|
+
spec.require_paths = ["lib"]
|
21
|
+
|
22
|
+
spec.add_dependency 'omniauth', '~> 1.0'
|
23
|
+
spec.add_dependency 'omniauth-oauth2', '~> 1.4'
|
24
|
+
spec.add_development_dependency "bundler", "~> 2.1"
|
25
|
+
spec.add_development_dependency "rake", '~> 13.0'
|
26
|
+
spec.add_development_dependency "rspec", "~> 3.0"
|
27
|
+
spec.add_development_dependency 'webmock', '~> 1.24', '>= 1.24.2'
|
28
|
+
end
|
metadata
ADDED
@@ -0,0 +1,150 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: omniauth-synced
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- waynels
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2025-03-07 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: omniauth
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: omniauth-oauth2
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '1.4'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '1.4'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: bundler
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '2.1'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '2.1'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rake
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '13.0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '13.0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rspec
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '3.0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '3.0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: webmock
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '1.24'
|
90
|
+
- - ">="
|
91
|
+
- !ruby/object:Gem::Version
|
92
|
+
version: 1.24.2
|
93
|
+
type: :development
|
94
|
+
prerelease: false
|
95
|
+
version_requirements: !ruby/object:Gem::Requirement
|
96
|
+
requirements:
|
97
|
+
- - "~>"
|
98
|
+
- !ruby/object:Gem::Version
|
99
|
+
version: '1.24'
|
100
|
+
- - ">="
|
101
|
+
- !ruby/object:Gem::Version
|
102
|
+
version: 1.24.2
|
103
|
+
description: " Official OmniAuth strategies for synced. "
|
104
|
+
email:
|
105
|
+
- clover_0304@163.com
|
106
|
+
executables: []
|
107
|
+
extensions: []
|
108
|
+
extra_rdoc_files: []
|
109
|
+
files:
|
110
|
+
- ".gitignore"
|
111
|
+
- ".ruby-version"
|
112
|
+
- Gemfile
|
113
|
+
- Gemfile.lock
|
114
|
+
- Guardfile
|
115
|
+
- README.md
|
116
|
+
- Rakefile
|
117
|
+
- bin/console
|
118
|
+
- bin/setup
|
119
|
+
- lib/omniauth-synced.rb
|
120
|
+
- lib/omniauth-synced/version.rb
|
121
|
+
- lib/omniauth/strategies/synced.rb
|
122
|
+
- lib/omniauth/strategies/wechat.rb
|
123
|
+
- lib/omniauth/strategies/wechat_service.rb
|
124
|
+
- lib/omniauth/strategies/weibo.rb
|
125
|
+
- lib/patch/omniauth-oauth2.rb
|
126
|
+
- omniauth-synced.gemspec
|
127
|
+
homepage: https://github.com/SyncedPSI/omniauth-synced
|
128
|
+
licenses:
|
129
|
+
- MIT
|
130
|
+
metadata: {}
|
131
|
+
post_install_message:
|
132
|
+
rdoc_options: []
|
133
|
+
require_paths:
|
134
|
+
- lib
|
135
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
136
|
+
requirements:
|
137
|
+
- - ">="
|
138
|
+
- !ruby/object:Gem::Version
|
139
|
+
version: '0'
|
140
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
141
|
+
requirements:
|
142
|
+
- - ">="
|
143
|
+
- !ruby/object:Gem::Version
|
144
|
+
version: '0'
|
145
|
+
requirements: []
|
146
|
+
rubygems_version: 3.1.6
|
147
|
+
signing_key:
|
148
|
+
specification_version: 4
|
149
|
+
summary: OmniAuth strategies for synced. Includes synced, weibo and wechat.
|
150
|
+
test_files: []
|