omniauth-keycloak 1.4.4 → 1.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -1
- data/Gemfile.lock +31 -23
- data/lib/keycloak/version.rb +1 -1
- data/lib/omniauth/strategies/keycloak-openid.rb +3 -2
- data/omniauth-keycloak.gemspec +1 -1
- data/spec/omniauth/strategies/keycloak_spec.rb +24 -0
- metadata +8 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2d8d99fcc7f0918b7fb7dd8190badbb8a0f47864171ad4f2db3a5f7576f010ac
|
4
|
+
data.tar.gz: 5ecaebf0b46ac4c953c93d53642d7dc71e074c68dc54736e3958f1f44e4489fb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 24b46f0e102b524ee70ce0a751135d7ea4eec64db1406d2a67af2c45434e634d61879b0fd78a6e57bbdc1f2632495a1d09335bd61069ad59bb86a0b807895146
|
7
|
+
data.tar.gz: d7165cafe46c8cd15aba9efff3229e91287061e6d52853b4e64ae0fc23618e4bc49b5d45aae11badaff048ba0e08d5db8a8724f5f56b266fb53669ff3621a403
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,14 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## [v1.4.4](https://github.com/ccrockett/omniauth-keycloak/tree/v1.4.4) (2022-07-25)
|
4
|
+
|
5
|
+
[Full Changelog](https://github.com/ccrockett/omniauth-keycloak/compare/v1.4.3...v1.4.4)
|
6
|
+
|
7
|
+
**Merged pull requests:**
|
8
|
+
|
9
|
+
- Fix NoMethodError when querying for JSON Web keys [\#31](https://github.com/ccrockett/omniauth-keycloak/pull/31) ([Kazhuu](https://github.com/Kazhuu))
|
10
|
+
- expose id\_token inside extra hash of auth hash [\#26](https://github.com/ccrockett/omniauth-keycloak/pull/26) ([rah-wtag](https://github.com/rah-wtag))
|
11
|
+
|
3
12
|
## [v1.4.3](https://github.com/ccrockett/omniauth-keycloak/tree/v1.4.3) (2022-07-24)
|
4
13
|
|
5
14
|
[Full Changelog](https://github.com/ccrockett/omniauth-keycloak/compare/v1.4.2...v1.4.3)
|
@@ -33,7 +42,6 @@
|
|
33
42
|
|
34
43
|
**Merged pull requests:**
|
35
44
|
|
36
|
-
- expose id\_token inside extra hash of auth hash [\#26](https://github.com/ccrockett/omniauth-keycloak/pull/26) ([rah-wtag](https://github.com/rah-wtag))
|
37
45
|
- Bump bindata from 2.4.9 to 2.4.10 [\#22](https://github.com/ccrockett/omniauth-keycloak/pull/22) ([dependabot[bot]](https://github.com/apps/dependabot))
|
38
46
|
|
39
47
|
## [v1.4.0](https://github.com/ccrockett/omniauth-keycloak/tree/v1.4.0) (2021-12-18)
|
data/Gemfile.lock
CHANGED
@@ -1,16 +1,16 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
omniauth-keycloak (1.4.
|
4
|
+
omniauth-keycloak (1.4.4)
|
5
5
|
faraday
|
6
|
-
json-jwt (
|
6
|
+
json-jwt (> 1.13.0)
|
7
7
|
omniauth (>= 2.0)
|
8
8
|
omniauth-oauth2 (~> 1.7.1)
|
9
9
|
|
10
10
|
GEM
|
11
11
|
remote: https://rubygems.org/
|
12
12
|
specs:
|
13
|
-
activesupport (7.0.
|
13
|
+
activesupport (7.0.4.2)
|
14
14
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
15
15
|
i18n (>= 1.6, < 2)
|
16
16
|
minitest (>= 5.1)
|
@@ -18,44 +18,48 @@ GEM
|
|
18
18
|
addressable (2.8.0)
|
19
19
|
public_suffix (>= 2.0.2, < 5.0)
|
20
20
|
aes_key_wrap (1.1.0)
|
21
|
-
bindata (2.4.
|
22
|
-
concurrent-ruby (1.
|
21
|
+
bindata (2.4.15)
|
22
|
+
concurrent-ruby (1.2.2)
|
23
23
|
crack (0.4.5)
|
24
24
|
rexml
|
25
25
|
diff-lcs (1.4.4)
|
26
26
|
docile (1.4.0)
|
27
|
-
faraday (2.
|
28
|
-
faraday-net_http (
|
27
|
+
faraday (2.7.4)
|
28
|
+
faraday-net_http (>= 2.0, < 3.1)
|
29
29
|
ruby2_keywords (>= 0.0.4)
|
30
|
-
faraday-
|
30
|
+
faraday-follow_redirects (0.3.0)
|
31
|
+
faraday (>= 1, < 3)
|
32
|
+
faraday-net_http (3.0.2)
|
31
33
|
hashdiff (1.0.1)
|
32
34
|
hashie (5.0.0)
|
33
|
-
i18n (1.
|
35
|
+
i18n (1.12.0)
|
34
36
|
concurrent-ruby (~> 1.0)
|
35
|
-
json-jwt (1.
|
37
|
+
json-jwt (1.16.3)
|
36
38
|
activesupport (>= 4.2)
|
37
39
|
aes_key_wrap
|
38
40
|
bindata
|
39
|
-
|
40
|
-
|
41
|
-
|
41
|
+
faraday (~> 2.0)
|
42
|
+
faraday-follow_redirects
|
43
|
+
jwt (2.7.0)
|
44
|
+
minitest (5.17.0)
|
42
45
|
multi_xml (0.6.0)
|
43
|
-
oauth2 (
|
46
|
+
oauth2 (2.0.9)
|
44
47
|
faraday (>= 0.17.3, < 3.0)
|
45
48
|
jwt (>= 1.0, < 3.0)
|
46
|
-
multi_json (~> 1.3)
|
47
49
|
multi_xml (~> 0.5)
|
48
|
-
rack (>= 1.2, <
|
49
|
-
|
50
|
+
rack (>= 1.2, < 4)
|
51
|
+
snaky_hash (~> 2.0)
|
52
|
+
version_gem (~> 1.1)
|
53
|
+
omniauth (2.1.1)
|
50
54
|
hashie (>= 3.4.6)
|
51
|
-
rack (>=
|
55
|
+
rack (>= 2.2.3)
|
52
56
|
rack-protection
|
53
|
-
omniauth-oauth2 (1.7.
|
54
|
-
oauth2 (
|
57
|
+
omniauth-oauth2 (1.7.3)
|
58
|
+
oauth2 (>= 1.4, < 3)
|
55
59
|
omniauth (>= 1.9, < 3)
|
56
60
|
public_suffix (4.0.6)
|
57
|
-
rack (
|
58
|
-
rack-protection (
|
61
|
+
rack (3.0.4.1)
|
62
|
+
rack-protection (3.0.5)
|
59
63
|
rack
|
60
64
|
rake (13.0.1)
|
61
65
|
rexml (3.2.5)
|
@@ -79,8 +83,12 @@ GEM
|
|
79
83
|
simplecov_json_formatter (~> 0.1)
|
80
84
|
simplecov-html (0.12.3)
|
81
85
|
simplecov_json_formatter (0.1.3)
|
82
|
-
|
86
|
+
snaky_hash (2.0.1)
|
87
|
+
hashie
|
88
|
+
version_gem (~> 1.1, >= 1.1.1)
|
89
|
+
tzinfo (2.0.6)
|
83
90
|
concurrent-ruby (~> 1.0)
|
91
|
+
version_gem (1.1.1)
|
84
92
|
webmock (3.14.0)
|
85
93
|
addressable (>= 2.8.0)
|
86
94
|
crack (>= 0.3.2)
|
data/lib/keycloak/version.rb
CHANGED
@@ -18,7 +18,8 @@ module OmniAuth
|
|
18
18
|
def setup_phase
|
19
19
|
super
|
20
20
|
|
21
|
-
if @authorize_url.nil? || @token_url.nil?
|
21
|
+
if (@authorize_url.nil? || @token_url.nil?) && !OmniAuth.config.test_mode
|
22
|
+
|
22
23
|
prevent_site_option_mistake
|
23
24
|
|
24
25
|
realm = options.client_options[:realm].nil? ? options.client_id : options.client_options[:realm]
|
@@ -51,7 +52,7 @@ module OmniAuth
|
|
51
52
|
@certs = json["keys"]
|
52
53
|
log :debug, "Successfully got certificate. Certificate length: #{@certs.length}"
|
53
54
|
else
|
54
|
-
message = "
|
55
|
+
message = "Couldn't get certificate. URL: #{@certs_endpoint}"
|
55
56
|
log :error, message
|
56
57
|
raise IntegrationError, message if raise_on_failure
|
57
58
|
end
|
data/omniauth-keycloak.gemspec
CHANGED
@@ -25,7 +25,7 @@ Gem::Specification.new do |spec|
|
|
25
25
|
|
26
26
|
spec.add_dependency "omniauth", ">= 2.0"
|
27
27
|
spec.add_dependency "omniauth-oauth2", "~> 1.7.1"
|
28
|
-
spec.add_dependency "json-jwt", "
|
28
|
+
spec.add_dependency "json-jwt", "> 1.13.0"
|
29
29
|
spec.add_dependency "faraday"
|
30
30
|
|
31
31
|
spec.add_development_dependency "bundler", "~> 2.2"
|
@@ -51,6 +51,30 @@ RSpec.describe OmniAuth::Strategies::KeycloakOpenId do
|
|
51
51
|
end
|
52
52
|
end
|
53
53
|
|
54
|
+
describe "test mode" do
|
55
|
+
let(:config_url) { "http://localhost:8080/realms/example-realm/.well-known/openid-configuration" }
|
56
|
+
|
57
|
+
subject do
|
58
|
+
stub_request(:get, config_url)
|
59
|
+
OmniAuth::Strategies::KeycloakOpenId.new('keycloak-openid', 'Example-Client', 'b53c572b-9f3b-4e79-bf8b-f03c799ba6ec',
|
60
|
+
client_options: {site: 'http://localhost:8080/', realm: 'example-realm', base_url: ''})
|
61
|
+
end
|
62
|
+
|
63
|
+
before do
|
64
|
+
OmniAuth.config.test_mode = true
|
65
|
+
end
|
66
|
+
|
67
|
+
after do
|
68
|
+
OmniAuth.config.test_mode = false
|
69
|
+
end
|
70
|
+
|
71
|
+
it 'should not fetch configuration when in test mode' do
|
72
|
+
subject.setup_phase
|
73
|
+
expect(a_request(:get, config_url)).not_to have_been_made
|
74
|
+
OmniAuth.config.test_mode = false
|
75
|
+
end
|
76
|
+
end
|
77
|
+
|
54
78
|
describe 'client base_url option set' do
|
55
79
|
context 'to blank string' do
|
56
80
|
let(:new_body_endpoints) {
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omniauth-keycloak
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cameron Crockett
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-03-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: omniauth
|
@@ -42,14 +42,14 @@ dependencies:
|
|
42
42
|
name: json-jwt
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - "
|
45
|
+
- - ">"
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: 1.13.0
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - "
|
52
|
+
- - ">"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: 1.13.0
|
55
55
|
- !ruby/object:Gem::Dependency
|
@@ -166,7 +166,7 @@ homepage: https://github.com/ccrockett/omniauth-keycloak
|
|
166
166
|
licenses:
|
167
167
|
- MIT
|
168
168
|
metadata: {}
|
169
|
-
post_install_message:
|
169
|
+
post_install_message:
|
170
170
|
rdoc_options: []
|
171
171
|
require_paths:
|
172
172
|
- lib
|
@@ -181,8 +181,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
181
181
|
- !ruby/object:Gem::Version
|
182
182
|
version: 3.1.2
|
183
183
|
requirements: []
|
184
|
-
rubygems_version: 3.
|
185
|
-
signing_key:
|
184
|
+
rubygems_version: 3.3.7
|
185
|
+
signing_key:
|
186
186
|
specification_version: 4
|
187
187
|
summary: Omniauth strategy for Keycloak
|
188
188
|
test_files: []
|