omniauth-keycloak 1.4.0 → 1.4.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +18 -25
- data/README.md +9 -0
- data/lib/keycloak/version.rb +1 -1
- data/lib/omniauth/strategies/keycloak-openid.rb +4 -3
- data/omniauth-keycloak.gemspec +2 -1
- metadata +20 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1494d8bd1dd545a49d8448e285844233045785b1bd0db84a1883cb28d8e8b2c9
|
4
|
+
data.tar.gz: ae275636ef1ba0a5cc32afab8511c62bd57e1fb253def902816182b6dff3ef50
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d87ac330e9f9663c09873f15a424c1f0357dfe75cf1dee07bee227248173067a7f39cc9de0d42b0f6f97c4a3bc03daee3ee7a2cc3ce4442af97d429ed1c2dc6f
|
7
|
+
data.tar.gz: f37f008f98a366938113c48f76cf19e74f3406fb0a66f695b4b934706e27375c61020cd1ec0b86a08f4ffe6465b905ff1ce5a953ee8f81dcdf06cd0f76302921
|
data/Gemfile.lock
CHANGED
@@ -1,53 +1,47 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
omniauth-keycloak (1.
|
4
|
+
omniauth-keycloak (1.4.2)
|
5
|
+
faraday
|
5
6
|
json-jwt (~> 1.13.0)
|
6
|
-
omniauth (
|
7
|
+
omniauth (>= 2.0)
|
7
8
|
omniauth-oauth2 (~> 1.7.1)
|
8
9
|
|
9
10
|
GEM
|
10
11
|
remote: https://rubygems.org/
|
11
12
|
specs:
|
12
|
-
activesupport (
|
13
|
+
activesupport (7.0.3)
|
13
14
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
14
15
|
i18n (>= 1.6, < 2)
|
15
16
|
minitest (>= 5.1)
|
16
17
|
tzinfo (~> 2.0)
|
17
|
-
zeitwerk (~> 2.3)
|
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.1.
|
21
|
+
bindata (2.4.10)
|
22
|
+
concurrent-ruby (1.1.10)
|
23
23
|
crack (0.4.5)
|
24
24
|
rexml
|
25
25
|
diff-lcs (1.4.4)
|
26
26
|
docile (1.4.0)
|
27
|
-
faraday (
|
28
|
-
faraday-
|
29
|
-
faraday-net_http (~> 1.0)
|
30
|
-
faraday-net_http_persistent (~> 1.1)
|
31
|
-
multipart-post (>= 1.2, < 3)
|
27
|
+
faraday (2.3.0)
|
28
|
+
faraday-net_http (~> 2.0)
|
32
29
|
ruby2_keywords (>= 0.0.4)
|
33
|
-
faraday-
|
34
|
-
faraday-net_http (1.0.1)
|
35
|
-
faraday-net_http_persistent (1.1.0)
|
30
|
+
faraday-net_http (2.0.3)
|
36
31
|
hashdiff (1.0.1)
|
37
|
-
hashie (
|
38
|
-
i18n (1.
|
32
|
+
hashie (5.0.0)
|
33
|
+
i18n (1.10.0)
|
39
34
|
concurrent-ruby (~> 1.0)
|
40
35
|
json-jwt (1.13.0)
|
41
36
|
activesupport (>= 4.2)
|
42
37
|
aes_key_wrap
|
43
38
|
bindata
|
44
|
-
jwt (2.
|
45
|
-
minitest (5.
|
39
|
+
jwt (2.3.0)
|
40
|
+
minitest (5.15.0)
|
46
41
|
multi_json (1.15.0)
|
47
42
|
multi_xml (0.6.0)
|
48
|
-
|
49
|
-
|
50
|
-
faraday (>= 0.8, < 2.0)
|
43
|
+
oauth2 (1.4.9)
|
44
|
+
faraday (>= 0.17.3, < 3.0)
|
51
45
|
jwt (>= 1.0, < 3.0)
|
52
46
|
multi_json (~> 1.3)
|
53
47
|
multi_xml (~> 0.5)
|
@@ -56,12 +50,12 @@ GEM
|
|
56
50
|
hashie (>= 3.4.6)
|
57
51
|
rack (>= 1.6.2, < 3)
|
58
52
|
rack-protection
|
59
|
-
omniauth-oauth2 (1.7.
|
53
|
+
omniauth-oauth2 (1.7.2)
|
60
54
|
oauth2 (~> 1.4)
|
61
55
|
omniauth (>= 1.9, < 3)
|
62
56
|
public_suffix (4.0.6)
|
63
57
|
rack (2.2.3)
|
64
|
-
rack-protection (2.
|
58
|
+
rack-protection (2.2.0)
|
65
59
|
rack
|
66
60
|
rake (13.0.1)
|
67
61
|
rexml (3.2.5)
|
@@ -78,7 +72,7 @@ GEM
|
|
78
72
|
diff-lcs (>= 1.2.0, < 2.0)
|
79
73
|
rspec-support (~> 3.10.0)
|
80
74
|
rspec-support (3.10.3)
|
81
|
-
ruby2_keywords (0.0.
|
75
|
+
ruby2_keywords (0.0.5)
|
82
76
|
simplecov (0.21.2)
|
83
77
|
docile (~> 1.1)
|
84
78
|
simplecov-html (~> 0.11)
|
@@ -91,7 +85,6 @@ GEM
|
|
91
85
|
addressable (>= 2.8.0)
|
92
86
|
crack (>= 0.3.2)
|
93
87
|
hashdiff (>= 0.4.0, < 2.0.0)
|
94
|
-
zeitwerk (2.4.2)
|
95
88
|
|
96
89
|
PLATFORMS
|
97
90
|
ruby
|
data/README.md
CHANGED
@@ -16,6 +16,15 @@ Or install it yourself as:
|
|
16
16
|
|
17
17
|
$ gem install omniauth-keycloak
|
18
18
|
|
19
|
+
## Use with Keycloak >= 17 (Quarkus distribution)
|
20
|
+
In version 17 of Keycloak, `/auth` was removed from the default context path. (See Issue [#29](https://github.com/ccrockett/omniauth-keycloak/issues/29))
|
21
|
+
In order to reduce breaking existing user's setup, this gem assumes `/auth` as the default context.
|
22
|
+
__So if you want to use Keycloak 17 or greater then you must do one of the following:__
|
23
|
+
|
24
|
+
1. Pass in `--http-relative-path '/auth'` option with the keycloak start command
|
25
|
+
2. Pass in a empty string for you base_url client_option:
|
26
|
+
`client_options: {base_url: '', site: 'https://example.keycloak-url.com', realm: 'example-realm'}`
|
27
|
+
|
19
28
|
## Usage
|
20
29
|
|
21
30
|
`OmniAuth::Strategies::Keycloak` is simply a Rack middleware. Read the OmniAuth docs for detailed instructions: https://github.com/intridea/omniauth.
|
data/lib/keycloak/version.rb
CHANGED
@@ -31,7 +31,7 @@ module OmniAuth
|
|
31
31
|
log :debug, "Going to get Keycloak configuration. URL: #{config_url}"
|
32
32
|
response = Faraday.get config_url
|
33
33
|
if (response.status == 200)
|
34
|
-
json =
|
34
|
+
json = JSON.parse(response.body)
|
35
35
|
|
36
36
|
@certs_endpoint = json["jwks_uri"]
|
37
37
|
@userinfo_endpoint = json["userinfo_endpoint"]
|
@@ -47,7 +47,7 @@ module OmniAuth
|
|
47
47
|
log :debug, "Going to get certificates. URL: #{@certs_endpoint}"
|
48
48
|
certs = Faraday.get @certs_endpoint
|
49
49
|
if (certs.status == 200)
|
50
|
-
json =
|
50
|
+
json = JSON.parse(response.body)
|
51
51
|
@certs = json["keys"]
|
52
52
|
log :debug, "Successfully got certificate. Certificate length: #{@certs.length}"
|
53
53
|
else
|
@@ -110,7 +110,8 @@ module OmniAuth
|
|
110
110
|
|
111
111
|
extra do
|
112
112
|
{
|
113
|
-
'raw_info' => raw_info
|
113
|
+
'raw_info' => raw_info,
|
114
|
+
'id_token' => access_token['id_token']
|
114
115
|
}
|
115
116
|
end
|
116
117
|
|
data/omniauth-keycloak.gemspec
CHANGED
@@ -23,9 +23,10 @@ Gem::Specification.new do |spec|
|
|
23
23
|
spec.require_paths = ["lib"]
|
24
24
|
|
25
25
|
|
26
|
-
spec.add_dependency "omniauth", "
|
26
|
+
spec.add_dependency "omniauth", ">= 2.0"
|
27
27
|
spec.add_dependency "omniauth-oauth2", "~> 1.7.1"
|
28
28
|
spec.add_dependency "json-jwt", "~> 1.13.0"
|
29
|
+
spec.add_dependency "faraday"
|
29
30
|
|
30
31
|
spec.add_development_dependency "bundler", "~> 2.2"
|
31
32
|
spec.add_development_dependency "rake", "~> 13.0"
|
metadata
CHANGED
@@ -1,29 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omniauth-keycloak
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cameron Crockett
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-07-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: omniauth
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 2.0
|
19
|
+
version: '2.0'
|
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: 2.0
|
26
|
+
version: '2.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: omniauth-oauth2
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -52,6 +52,20 @@ dependencies:
|
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: 1.13.0
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: faraday
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
55
69
|
- !ruby/object:Gem::Dependency
|
56
70
|
name: bundler
|
57
71
|
requirement: !ruby/object:Gem::Requirement
|