omniauth-jaccount 0.1.3 → 0.1.5
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 +5 -5
- data/Gemfile.lock +48 -33
- data/lib/omniauth/jaccount/version.rb +1 -1
- data/lib/omniauth/strategies/jaccount.rb +15 -14
- data/omniauth-jaccount.gemspec +6 -8
- metadata +21 -44
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: b9ec845ac5d4c3003fc9ba2cef08142610d07ad607f9f8c46c1148f52c3273b7
|
4
|
+
data.tar.gz: eee1a0e9bcceafbfa8a329dd02fbfc03506be84513440188c48cc0e5a7958a40
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9b06eb26133d5a6178d74a7638c068f843bace408d37801a88ed5a880c3d2f6be1d22247e4236198ee7eda8d808bcf1fd2a349033d7d2a8e7d58dfa18b48a99e
|
7
|
+
data.tar.gz: 807279cb64543341406672b1e25ea930781bc97f6e06356e57a993e2aa7906e5092b9a2f1a161181a3e52fbe130aed0835b4068b05aada75f545fea3d8cda4fe
|
data/Gemfile.lock
CHANGED
@@ -1,57 +1,72 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
omniauth-jaccount (0.1.
|
5
|
-
omniauth (~> 1.
|
6
|
-
omniauth-oauth2 (
|
4
|
+
omniauth-jaccount (0.1.5)
|
5
|
+
omniauth (~> 1.5)
|
6
|
+
omniauth-oauth2 (>= 1.4.0, < 2.0)
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: https://rubygems.org/
|
10
10
|
specs:
|
11
|
-
diff-lcs (1.
|
12
|
-
faraday (
|
11
|
+
diff-lcs (1.4.4)
|
12
|
+
faraday (1.8.0)
|
13
|
+
faraday-em_http (~> 1.0)
|
14
|
+
faraday-em_synchrony (~> 1.0)
|
15
|
+
faraday-excon (~> 1.1)
|
16
|
+
faraday-httpclient (~> 1.0.1)
|
17
|
+
faraday-net_http (~> 1.0)
|
18
|
+
faraday-net_http_persistent (~> 1.1)
|
19
|
+
faraday-patron (~> 1.0)
|
20
|
+
faraday-rack (~> 1.0)
|
13
21
|
multipart-post (>= 1.2, < 3)
|
14
|
-
|
15
|
-
|
16
|
-
|
22
|
+
ruby2_keywords (>= 0.0.4)
|
23
|
+
faraday-em_http (1.0.0)
|
24
|
+
faraday-em_synchrony (1.0.0)
|
25
|
+
faraday-excon (1.1.0)
|
26
|
+
faraday-httpclient (1.0.1)
|
27
|
+
faraday-net_http (1.0.1)
|
28
|
+
faraday-net_http_persistent (1.2.0)
|
29
|
+
faraday-patron (1.0.0)
|
30
|
+
faraday-rack (1.0.0)
|
31
|
+
hashie (4.1.0)
|
32
|
+
jwt (2.3.0)
|
33
|
+
multi_json (1.15.0)
|
17
34
|
multi_xml (0.6.0)
|
18
|
-
multipart-post (2.
|
19
|
-
oauth2 (1.4.
|
20
|
-
faraday (>= 0.8, <
|
35
|
+
multipart-post (2.1.1)
|
36
|
+
oauth2 (1.4.7)
|
37
|
+
faraday (>= 0.8, < 2.0)
|
21
38
|
jwt (>= 1.0, < 3.0)
|
22
39
|
multi_json (~> 1.3)
|
23
40
|
multi_xml (~> 0.5)
|
24
41
|
rack (>= 1.2, < 3)
|
25
|
-
omniauth (1.9.
|
26
|
-
hashie (>= 3.4.6
|
42
|
+
omniauth (1.9.1)
|
43
|
+
hashie (>= 3.4.6)
|
27
44
|
rack (>= 1.6.2, < 3)
|
28
|
-
omniauth-oauth2 (1.
|
29
|
-
oauth2 (~> 1.
|
30
|
-
omniauth (
|
31
|
-
rack (2.
|
32
|
-
|
33
|
-
|
34
|
-
rspec-
|
35
|
-
rspec-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
rspec-expectations (3.8.2)
|
45
|
+
omniauth-oauth2 (1.7.1)
|
46
|
+
oauth2 (~> 1.4)
|
47
|
+
omniauth (>= 1.9, < 3)
|
48
|
+
rack (2.2.3)
|
49
|
+
rspec (3.10.0)
|
50
|
+
rspec-core (~> 3.10.0)
|
51
|
+
rspec-expectations (~> 3.10.0)
|
52
|
+
rspec-mocks (~> 3.10.0)
|
53
|
+
rspec-core (3.10.1)
|
54
|
+
rspec-support (~> 3.10.0)
|
55
|
+
rspec-expectations (3.10.1)
|
40
56
|
diff-lcs (>= 1.2.0, < 2.0)
|
41
|
-
rspec-support (~> 3.
|
42
|
-
rspec-mocks (3.
|
57
|
+
rspec-support (~> 3.10.0)
|
58
|
+
rspec-mocks (3.10.2)
|
43
59
|
diff-lcs (>= 1.2.0, < 2.0)
|
44
|
-
rspec-support (~> 3.
|
45
|
-
rspec-support (3.
|
60
|
+
rspec-support (~> 3.10.0)
|
61
|
+
rspec-support (3.10.2)
|
62
|
+
ruby2_keywords (0.0.5)
|
46
63
|
|
47
64
|
PLATFORMS
|
48
65
|
ruby
|
49
66
|
|
50
67
|
DEPENDENCIES
|
51
|
-
bundler (~> 1.16)
|
52
68
|
omniauth-jaccount!
|
53
|
-
|
54
|
-
rspec (~> 3.0)
|
69
|
+
rspec (~> 3.5)
|
55
70
|
|
56
71
|
BUNDLED WITH
|
57
|
-
|
72
|
+
2.2.29
|
@@ -4,34 +4,35 @@ module OmniAuth
|
|
4
4
|
module Strategies
|
5
5
|
class JAccount < OmniAuth::Strategies::OAuth2
|
6
6
|
option :client_options, {
|
7
|
-
:
|
8
|
-
:
|
9
|
-
:
|
7
|
+
site: 'https://api.sjtu.edu.cn/v1',
|
8
|
+
authorize_url: 'https://jaccount.sjtu.edu.cn/oauth2/authorize',
|
9
|
+
token_url: 'https://jaccount.sjtu.edu.cn/oauth2/token'
|
10
10
|
}
|
11
11
|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
12
|
+
def authorize_params
|
13
|
+
super.tap do |params|
|
14
|
+
%w[scope client_options].each do |v|
|
15
|
+
params[v.to_sym] = request.params[v] if request.params[v]
|
16
|
+
end
|
17
|
+
end
|
16
18
|
end
|
17
19
|
|
18
|
-
uid { raw_info[
|
20
|
+
uid { raw_info['id'].to_s }
|
19
21
|
|
20
22
|
info do
|
21
23
|
{
|
22
|
-
'email'
|
23
|
-
'name'
|
24
|
+
'email': raw_info['account'] + '@sjtu.edu.cn',
|
25
|
+
'name': raw_info['name'],
|
26
|
+
'account': raw_info['account']
|
24
27
|
}
|
25
28
|
end
|
26
29
|
|
27
30
|
extra do
|
28
|
-
{:
|
31
|
+
{raw_info: raw_info}
|
29
32
|
end
|
30
33
|
|
31
34
|
def raw_info
|
32
|
-
@raw_info ||= access_token.get('
|
33
|
-
#puts @raw_info
|
34
|
-
@raw_info["entities"][0]
|
35
|
+
@raw_info ||= access_token.get('/me/profile').parsed['entities'][0]
|
35
36
|
end
|
36
37
|
|
37
38
|
def callback_url
|
data/omniauth-jaccount.gemspec
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
|
2
|
-
lib = File.expand_path("../lib", __FILE__)
|
3
|
-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
-
require "omniauth/jaccount/version"
|
2
|
+
# lib = File.expand_path("../lib", __FILE__)
|
3
|
+
# $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require File.expand_path("../lib/omniauth/jaccount/version", __FILE__)
|
5
5
|
|
6
6
|
Gem::Specification.new do |spec|
|
7
7
|
spec.name = "omniauth-jaccount"
|
@@ -21,9 +21,7 @@ Gem::Specification.new do |spec|
|
|
21
21
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
22
22
|
spec.require_paths = ["lib"]
|
23
23
|
|
24
|
-
spec.add_dependency 'omniauth', '~> 1.
|
25
|
-
spec.add_dependency 'omniauth-oauth2', '
|
26
|
-
spec.add_development_dependency
|
27
|
-
spec.add_development_dependency "rake", "~> 10.0"
|
28
|
-
spec.add_development_dependency "rspec", "~> 3.0"
|
24
|
+
spec.add_dependency 'omniauth', '~> 1.5'
|
25
|
+
spec.add_dependency 'omniauth-oauth2', '>= 1.4.0', '< 2.0'
|
26
|
+
spec.add_development_dependency 'rspec', '~> 3.5'
|
29
27
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omniauth-jaccount
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- feynixs
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-10-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: omniauth
|
@@ -16,71 +16,49 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '1.
|
19
|
+
version: '1.5'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '1.
|
26
|
+
version: '1.5'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: omniauth-oauth2
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: '1.0'
|
34
|
-
type: :runtime
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - "~>"
|
31
|
+
- - ">="
|
39
32
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
41
|
-
-
|
42
|
-
name: bundler
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
44
|
-
requirements:
|
45
|
-
- - "~>"
|
33
|
+
version: 1.4.0
|
34
|
+
- - "<"
|
46
35
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
48
|
-
type: :
|
36
|
+
version: '2.0'
|
37
|
+
type: :runtime
|
49
38
|
prerelease: false
|
50
39
|
version_requirements: !ruby/object:Gem::Requirement
|
51
40
|
requirements:
|
52
|
-
- - "
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version: '1.16'
|
55
|
-
- !ruby/object:Gem::Dependency
|
56
|
-
name: rake
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
58
|
-
requirements:
|
59
|
-
- - "~>"
|
41
|
+
- - ">="
|
60
42
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
62
|
-
|
63
|
-
prerelease: false
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
65
|
-
requirements:
|
66
|
-
- - "~>"
|
43
|
+
version: 1.4.0
|
44
|
+
- - "<"
|
67
45
|
- !ruby/object:Gem::Version
|
68
|
-
version: '
|
46
|
+
version: '2.0'
|
69
47
|
- !ruby/object:Gem::Dependency
|
70
48
|
name: rspec
|
71
49
|
requirement: !ruby/object:Gem::Requirement
|
72
50
|
requirements:
|
73
51
|
- - "~>"
|
74
52
|
- !ruby/object:Gem::Version
|
75
|
-
version: '3.
|
53
|
+
version: '3.5'
|
76
54
|
type: :development
|
77
55
|
prerelease: false
|
78
56
|
version_requirements: !ruby/object:Gem::Requirement
|
79
57
|
requirements:
|
80
58
|
- - "~>"
|
81
59
|
- !ruby/object:Gem::Version
|
82
|
-
version: '3.
|
83
|
-
description:
|
60
|
+
version: '3.5'
|
61
|
+
description:
|
84
62
|
email:
|
85
63
|
- feynixs@gmail.com
|
86
64
|
executables: []
|
@@ -100,10 +78,10 @@ files:
|
|
100
78
|
- lib/omniauth/jaccount/version.rb
|
101
79
|
- lib/omniauth/strategies/jaccount.rb
|
102
80
|
- omniauth-jaccount.gemspec
|
103
|
-
homepage:
|
81
|
+
homepage:
|
104
82
|
licenses: []
|
105
83
|
metadata: {}
|
106
|
-
post_install_message:
|
84
|
+
post_install_message:
|
107
85
|
rdoc_options: []
|
108
86
|
require_paths:
|
109
87
|
- lib
|
@@ -118,9 +96,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
118
96
|
- !ruby/object:Gem::Version
|
119
97
|
version: '0'
|
120
98
|
requirements: []
|
121
|
-
|
122
|
-
|
123
|
-
signing_key:
|
99
|
+
rubygems_version: 3.1.4
|
100
|
+
signing_key:
|
124
101
|
specification_version: 4
|
125
102
|
summary: omniauth for jaccount
|
126
103
|
test_files: []
|