omniauth-idcat_mobil 0.3.0 → 0.5.0

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
  SHA256:
3
- metadata.gz: 77244f98eff1b7533ec93e6dd46935aa70b22cee688b2104c261b5a57b179e4d
4
- data.tar.gz: da770c4b57a94bf8ad13724d4f5c472b5a1332dae37d01c926791342efc88a7e
3
+ metadata.gz: 27e409d3e5d4088b730e67eae75b98113218440b00b3446da5f53821258937d7
4
+ data.tar.gz: 5efde7d2248f8299c758749d5e6031e6c9d4f68e2635c615e6c9bfd944b60935
5
5
  SHA512:
6
- metadata.gz: f809df619221c3092a758a8d328ebfded02d284af2fac08994b7cdb0503d8846ff5e6183284e56004b64dd401864d926ee9180f0aede8a38a662ebbda5d39246
7
- data.tar.gz: 61b880b43183df731fadfb0ab545e22cb4c0bf4fee4fc57af333da3475d56a2c257d6711bc71a2042f5db20bbe6913ffbfbef6b8f5b9ae1d5d9afb95567bdd0c
6
+ metadata.gz: ce72d9c3f61068d67fb8d48ada9ba40398e6912e42bc7a2cc26040e29d27f184570309438c48b54130fcdda071b09e5a494657ed30d2fc4a7a9f072f4c796c20
7
+ data.tar.gz: bf2a541a13da6e760ce13873e92fed42ae1d3400e1d3fb3907032932d8878495775468b6abb8a9953f773abbef133db58d495f2b79e6c1b035e13aaf10096f04
data/.gitignore CHANGED
@@ -6,4 +6,4 @@
6
6
  /pkg/
7
7
  /spec/reports/
8
8
  /tmp/
9
- Gemfile.lock
9
+ .byebug_history
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.7.5
1
+ 2.7.7
data/CHANGELOG.md CHANGED
@@ -2,8 +2,14 @@
2
2
 
3
3
  ## next version:
4
4
 
5
+ ## Version 0.5.0 (MINOR)
6
+ - Send the client_id and the client_secret during the AuthToken retrieval.
7
+
8
+ ## Version 0.4.0 (MINOR)
9
+ - Upgrade omniauth to 2.0.4
10
+
5
11
  ## Version 0.3.0 (MINOR)
6
- - CI: Intoduce continous integration via GitHub Actions.
12
+ - CI: Introduce continuous integration via GitHub Actions.
7
13
  - CI: Apply `rubocop` recommendations.
8
14
 
9
15
  ## Version 0.2.4 (PATCH)
data/Gemfile CHANGED
@@ -8,6 +8,7 @@ git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
8
8
  gemspec
9
9
 
10
10
  group :development, :test do
11
+ gem "byebug"
11
12
  gem "rubocop"
12
13
  gem "rubocop-rspec"
13
14
  end
data/Gemfile.lock ADDED
@@ -0,0 +1,92 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ omniauth-idcat_mobil (0.5.0)
5
+ omniauth (~> 2.0.4)
6
+ omniauth-oauth2 (>= 1.7.2, < 2.0)
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ ast (2.4.2)
12
+ byebug (11.1.3)
13
+ diff-lcs (1.4.4)
14
+ faraday (2.3.0)
15
+ faraday-net_http (~> 2.0)
16
+ ruby2_keywords (>= 0.0.4)
17
+ faraday-net_http (2.0.3)
18
+ hashie (5.0.0)
19
+ jwt (2.3.0)
20
+ multi_json (1.15.0)
21
+ multi_xml (0.6.0)
22
+ oauth2 (1.4.9)
23
+ faraday (>= 0.17.3, < 3.0)
24
+ jwt (>= 1.0, < 3.0)
25
+ multi_json (~> 1.3)
26
+ multi_xml (~> 0.5)
27
+ rack (>= 1.2, < 3)
28
+ omniauth (2.0.4)
29
+ hashie (>= 3.4.6)
30
+ rack (>= 1.6.2, < 3)
31
+ rack-protection
32
+ omniauth-oauth2 (1.7.2)
33
+ oauth2 (~> 1.4)
34
+ omniauth (>= 1.9, < 3)
35
+ parallel (1.21.0)
36
+ parser (3.1.0.0)
37
+ ast (~> 2.4.1)
38
+ rack (2.2.3)
39
+ rack-protection (2.2.0)
40
+ rack
41
+ rack-test (1.1.0)
42
+ rack (>= 1.0, < 3)
43
+ rainbow (3.1.1)
44
+ rake (12.3.3)
45
+ regexp_parser (2.2.0)
46
+ rexml (3.2.5)
47
+ rspec (3.10.0)
48
+ rspec-core (~> 3.10.0)
49
+ rspec-expectations (~> 3.10.0)
50
+ rspec-mocks (~> 3.10.0)
51
+ rspec-core (3.10.1)
52
+ rspec-support (~> 3.10.0)
53
+ rspec-expectations (3.10.1)
54
+ diff-lcs (>= 1.2.0, < 2.0)
55
+ rspec-support (~> 3.10.0)
56
+ rspec-mocks (3.10.2)
57
+ diff-lcs (>= 1.2.0, < 2.0)
58
+ rspec-support (~> 3.10.0)
59
+ rspec-support (3.10.2)
60
+ rubocop (1.25.0)
61
+ parallel (~> 1.10)
62
+ parser (>= 3.1.0.0)
63
+ rainbow (>= 2.2.2, < 4.0)
64
+ regexp_parser (>= 1.8, < 3.0)
65
+ rexml
66
+ rubocop-ast (>= 1.15.1, < 2.0)
67
+ ruby-progressbar (~> 1.7)
68
+ unicode-display_width (>= 1.4.0, < 3.0)
69
+ rubocop-ast (1.15.1)
70
+ parser (>= 3.0.1.1)
71
+ rubocop-rspec (2.8.0)
72
+ rubocop (~> 1.19)
73
+ ruby-progressbar (1.11.0)
74
+ ruby2_keywords (0.0.5)
75
+ unicode-display_width (2.1.0)
76
+
77
+ PLATFORMS
78
+ ruby
79
+
80
+ DEPENDENCIES
81
+ bundler (~> 2.2, >= 2.2.10)
82
+ byebug
83
+ omniauth-idcat_mobil!
84
+ rack (>= 2.1.4)
85
+ rack-test
86
+ rake (~> 12.3, >= 12.3.3)
87
+ rspec (~> 3.0)
88
+ rubocop
89
+ rubocop-rspec
90
+
91
+ BUNDLED WITH
92
+ 2.4.9
data/README.md CHANGED
@@ -46,7 +46,7 @@ For IdCat mòbil we still need to perform an extra step during the +callback_pha
46
46
 
47
47
  ### request_phase
48
48
 
49
- `omniauth-idcat_mobil` does not implement this method, instead we rely in the default implementation in `OmniAuth::Strategies::OAuth2`.
49
+ `omniauth-idcat_mobil` does not implement this method, instead we rely on the default implementation in `OmniAuth::Strategies::OAuth2`.
50
50
  It simply redirects the user to the authentiction provider to authenticate.
51
51
  When users finish with the authentication workflow in IdCat mòbil, this authentication provider redirects them to our `callback_phase`.
52
52
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Omniauth
4
4
  module IdCatMobil
5
- VERSION = "0.3.0"
5
+ VERSION = "0.5.0"
6
6
  end
7
7
  end
@@ -20,6 +20,8 @@ module OmniAuth
20
20
  mode: :query, # put the param in the query of the requested url
21
21
  param_name: "AccessToken"
22
22
  }
23
+ # will be merged with token_params
24
+ option :token_options, [:client_id, :client_secret]
23
25
 
24
26
  option :user_info_path, "/serveis-rest/getUserInfo"
25
27
 
@@ -112,7 +114,7 @@ module OmniAuth
112
114
  # The url where the provider should redirect the users to after authenticating.
113
115
  # https://github.com/intridea/omniauth-oauth2/issues/81
114
116
  def callback_url
115
- full_host + script_name + callback_path
117
+ File.join([full_host, script_name, callback_path].compact)
116
118
  end
117
119
 
118
120
  # --------------------------------------------------
@@ -24,8 +24,8 @@ Gem::Specification.new do |spec|
24
24
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
25
25
  spec.require_paths = ["lib"]
26
26
 
27
- spec.add_dependency "omniauth", "~> 1.5"
28
- spec.add_dependency "omniauth-oauth2", ">= 1.4.0", "< 2.0"
27
+ spec.add_dependency "omniauth", "~> 2.0.4"
28
+ spec.add_dependency "omniauth-oauth2", ">= 1.7.2", "< 2.0"
29
29
  spec.add_development_dependency "bundler", "~> 2.2", ">= 2.2.10"
30
30
  spec.add_development_dependency "rake", "~> 12.3", ">= 12.3.3"
31
31
  spec.metadata["rubygems_mfa_required"] = "true"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-idcat_mobil
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Oliver Valls
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-02-02 00:00:00.000000000 Z
11
+ date: 2023-03-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: omniauth
@@ -16,21 +16,21 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.5'
19
+ version: 2.0.4
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.5'
26
+ version: 2.0.4
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: omniauth-oauth2
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: 1.4.0
33
+ version: 1.7.2
34
34
  - - "<"
35
35
  - !ruby/object:Gem::Version
36
36
  version: '2.0'
@@ -40,7 +40,7 @@ dependencies:
40
40
  requirements:
41
41
  - - ">="
42
42
  - !ruby/object:Gem::Version
43
- version: 1.4.0
43
+ version: 1.7.2
44
44
  - - "<"
45
45
  - !ruby/object:Gem::Version
46
46
  version: '2.0'
@@ -101,6 +101,7 @@ files:
101
101
  - CHANGELOG.md
102
102
  - CODE_OF_CONDUCT.md
103
103
  - Gemfile
104
+ - Gemfile.lock
104
105
  - LICENSE
105
106
  - LICENSE.txt
106
107
  - README.md