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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 42a3358ad3f8f4524e7d212d716e99eda02fa1b5030dcdeedf1d4b77551be450
4
- data.tar.gz: 6d3b47d546bbec7de0a9d4c5cba6f1b88568f234180ed195ce84d0f37d9b35d4
3
+ metadata.gz: 1494d8bd1dd545a49d8448e285844233045785b1bd0db84a1883cb28d8e8b2c9
4
+ data.tar.gz: ae275636ef1ba0a5cc32afab8511c62bd57e1fb253def902816182b6dff3ef50
5
5
  SHA512:
6
- metadata.gz: f27d6b806f0297f6ffc72c722185a8bc5fa76cb32441dc1936ae8d88109bb2b294c05bcde3f4411254adee5f2af5ae5035e63e151762f030ac9c3bbbfdc000fb
7
- data.tar.gz: eaac842f3e02d03f5c9cbb677e8c60da6f5159582b742ae94b839210861c8e7133ea23f2e462cf180d217cb4ef6702ab8a7ba8ff09719716ab96a538cbf733b6
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.3.0)
4
+ omniauth-keycloak (1.4.2)
5
+ faraday
5
6
  json-jwt (~> 1.13.0)
6
- omniauth (~> 2.0.4)
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 (6.1.3.2)
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.9)
22
- concurrent-ruby (1.1.8)
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 (1.4.1)
28
- faraday-excon (~> 1.1)
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-excon (1.1.0)
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 (4.1.0)
38
- i18n (1.8.10)
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.2.3)
45
- minitest (5.14.4)
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
- multipart-post (2.1.1)
49
- oauth2 (1.4.7)
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.1)
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.1.0)
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.4)
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.
@@ -1,5 +1,5 @@
1
1
  module Omniauth
2
2
  module Keycloak
3
- VERSION = "1.4.0"
3
+ VERSION = "1.4.3"
4
4
  end
5
5
  end
@@ -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 = MultiJson.load(response.body)
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 = MultiJson.load(certs.body)
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
 
@@ -23,9 +23,10 @@ Gem::Specification.new do |spec|
23
23
  spec.require_paths = ["lib"]
24
24
 
25
25
 
26
- spec.add_dependency "omniauth", "~> 2.0.4"
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.0
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: 2021-12-18 00:00:00.000000000 Z
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.4
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.4
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