keycloak-api-rails 0.12.2 → 0.12.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: dc85b0700082d2d2a0ac3e85cf582481e5c4f314831e8b6dfcb528f082cb06f8
4
- data.tar.gz: 7b1e40233abd17a16a6fe292cb7de97d4ffb99cb097c7dfea1f7582124ab8f46
3
+ metadata.gz: 834cdb0350ed3724a6f28aed40c36b3a51d96850f49ef8a0b9946a8135f1ca56
4
+ data.tar.gz: 8ec6a52a53e688cb20feaf9762e17bde13fbbf483d0413bf95400833a79ac6e1
5
5
  SHA512:
6
- metadata.gz: 9ec86c805549cb170f3c7bc5cd426e3259532a67e749da24821fa0a6a70b8490802ea8445ed4f8e44f129b22ea745ba1f407c901538731ee271215cadebdde8c
7
- data.tar.gz: ddd4010fae25886bded42e92eca32509540450f313c0e943dee711d14ece540cad5c03ae13a1882358e9f221a07ae723d72f7ed0ca2ab3d508b8ee4ce2e15667
6
+ metadata.gz: 947afe4ef457d63988f592b16a57b9dd8bf7a58e7c6f403525e5a228a992c49d51262541cd5feb6b7c3c7722fd7390f7447fb698c273f359448ed3f46b3d2fd8
7
+ data.tar.gz: efb05a679ff2c389618534e975425276c9007651b495abc19a7f381116fe81fba490571e4d751cfbd69aa8a02c685d1738b543fabd99ca9fe07dcf9319a87701
data/CHANGELOG.md CHANGED
@@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+
9
+ ## [0.12.3] - 2024-06-20
10
+
11
+ * Add a debug log when not being able to validate a JWT
12
+
8
13
  ## [0.12.2] - 2023-06-03
9
14
 
10
15
  * Avoid methods `logger`, `service` an `config` of `Keycloak::Authentication` to conflict with other concerns, such as rails. (thanks to @mkrawc)
data/Gemfile.lock CHANGED
@@ -1,104 +1,122 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- keycloak-api-rails (0.12.2)
4
+ keycloak-api-rails (0.12.3)
5
5
  json-jwt (>= 1.11.0)
6
6
  rails (>= 4.2)
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
- actioncable (7.0.5)
12
- actionpack (= 7.0.5)
13
- activesupport (= 7.0.5)
11
+ actioncable (7.1.3.4)
12
+ actionpack (= 7.1.3.4)
13
+ activesupport (= 7.1.3.4)
14
14
  nio4r (~> 2.0)
15
15
  websocket-driver (>= 0.6.1)
16
- actionmailbox (7.0.5)
17
- actionpack (= 7.0.5)
18
- activejob (= 7.0.5)
19
- activerecord (= 7.0.5)
20
- activestorage (= 7.0.5)
21
- activesupport (= 7.0.5)
16
+ zeitwerk (~> 2.6)
17
+ actionmailbox (7.1.3.4)
18
+ actionpack (= 7.1.3.4)
19
+ activejob (= 7.1.3.4)
20
+ activerecord (= 7.1.3.4)
21
+ activestorage (= 7.1.3.4)
22
+ activesupport (= 7.1.3.4)
22
23
  mail (>= 2.7.1)
23
24
  net-imap
24
25
  net-pop
25
26
  net-smtp
26
- actionmailer (7.0.5)
27
- actionpack (= 7.0.5)
28
- actionview (= 7.0.5)
29
- activejob (= 7.0.5)
30
- activesupport (= 7.0.5)
27
+ actionmailer (7.1.3.4)
28
+ actionpack (= 7.1.3.4)
29
+ actionview (= 7.1.3.4)
30
+ activejob (= 7.1.3.4)
31
+ activesupport (= 7.1.3.4)
31
32
  mail (~> 2.5, >= 2.5.4)
32
33
  net-imap
33
34
  net-pop
34
35
  net-smtp
35
- rails-dom-testing (~> 2.0)
36
- actionpack (7.0.5)
37
- actionview (= 7.0.5)
38
- activesupport (= 7.0.5)
39
- rack (~> 2.0, >= 2.2.4)
36
+ rails-dom-testing (~> 2.2)
37
+ actionpack (7.1.3.4)
38
+ actionview (= 7.1.3.4)
39
+ activesupport (= 7.1.3.4)
40
+ nokogiri (>= 1.8.5)
41
+ racc
42
+ rack (>= 2.2.4)
43
+ rack-session (>= 1.0.1)
40
44
  rack-test (>= 0.6.3)
41
- rails-dom-testing (~> 2.0)
42
- rails-html-sanitizer (~> 1.0, >= 1.2.0)
43
- actiontext (7.0.5)
44
- actionpack (= 7.0.5)
45
- activerecord (= 7.0.5)
46
- activestorage (= 7.0.5)
47
- activesupport (= 7.0.5)
45
+ rails-dom-testing (~> 2.2)
46
+ rails-html-sanitizer (~> 1.6)
47
+ actiontext (7.1.3.4)
48
+ actionpack (= 7.1.3.4)
49
+ activerecord (= 7.1.3.4)
50
+ activestorage (= 7.1.3.4)
51
+ activesupport (= 7.1.3.4)
48
52
  globalid (>= 0.6.0)
49
53
  nokogiri (>= 1.8.5)
50
- actionview (7.0.5)
51
- activesupport (= 7.0.5)
54
+ actionview (7.1.3.4)
55
+ activesupport (= 7.1.3.4)
52
56
  builder (~> 3.1)
53
- erubi (~> 1.4)
54
- rails-dom-testing (~> 2.0)
55
- rails-html-sanitizer (~> 1.1, >= 1.2.0)
56
- activejob (7.0.5)
57
- activesupport (= 7.0.5)
57
+ erubi (~> 1.11)
58
+ rails-dom-testing (~> 2.2)
59
+ rails-html-sanitizer (~> 1.6)
60
+ activejob (7.1.3.4)
61
+ activesupport (= 7.1.3.4)
58
62
  globalid (>= 0.3.6)
59
- activemodel (7.0.5)
60
- activesupport (= 7.0.5)
61
- activerecord (7.0.5)
62
- activemodel (= 7.0.5)
63
- activesupport (= 7.0.5)
64
- activestorage (7.0.5)
65
- actionpack (= 7.0.5)
66
- activejob (= 7.0.5)
67
- activerecord (= 7.0.5)
68
- activesupport (= 7.0.5)
63
+ activemodel (7.1.3.4)
64
+ activesupport (= 7.1.3.4)
65
+ activerecord (7.1.3.4)
66
+ activemodel (= 7.1.3.4)
67
+ activesupport (= 7.1.3.4)
68
+ timeout (>= 0.4.0)
69
+ activestorage (7.1.3.4)
70
+ actionpack (= 7.1.3.4)
71
+ activejob (= 7.1.3.4)
72
+ activerecord (= 7.1.3.4)
73
+ activesupport (= 7.1.3.4)
69
74
  marcel (~> 1.0)
70
- mini_mime (>= 1.1.0)
71
- activesupport (7.0.5)
75
+ activesupport (7.1.3.4)
76
+ base64
77
+ bigdecimal
72
78
  concurrent-ruby (~> 1.0, >= 1.0.2)
79
+ connection_pool (>= 2.2.5)
80
+ drb
73
81
  i18n (>= 1.6, < 2)
74
82
  minitest (>= 5.1)
83
+ mutex_m
75
84
  tzinfo (~> 2.0)
76
85
  aes_key_wrap (1.1.0)
77
- bindata (2.4.15)
78
- builder (3.2.4)
86
+ base64 (0.2.0)
87
+ bigdecimal (3.1.8)
88
+ bindata (2.5.0)
89
+ builder (3.3.0)
79
90
  byebug (11.1.3)
80
- concurrent-ruby (1.2.2)
91
+ concurrent-ruby (1.3.3)
92
+ connection_pool (2.4.1)
81
93
  crass (1.0.6)
82
- date (3.3.3)
83
- diff-lcs (1.5.0)
84
- erubi (1.12.0)
85
- faraday (2.7.5)
86
- faraday-net_http (>= 2.0, < 3.1)
87
- ruby2_keywords (>= 0.0.4)
94
+ date (3.3.4)
95
+ diff-lcs (1.5.1)
96
+ drb (2.2.1)
97
+ erubi (1.13.0)
98
+ faraday (2.9.2)
99
+ faraday-net_http (>= 2.0, < 3.2)
88
100
  faraday-follow_redirects (0.3.0)
89
101
  faraday (>= 1, < 3)
90
- faraday-net_http (3.0.2)
91
- globalid (1.1.0)
92
- activesupport (>= 5.0)
93
- i18n (1.14.0)
102
+ faraday-net_http (3.1.0)
103
+ net-http
104
+ globalid (1.2.1)
105
+ activesupport (>= 6.1)
106
+ i18n (1.14.5)
94
107
  concurrent-ruby (~> 1.0)
95
- json-jwt (1.16.3)
108
+ io-console (0.7.2)
109
+ irb (1.13.2)
110
+ rdoc (>= 4.0.0)
111
+ reline (>= 0.4.2)
112
+ json-jwt (1.16.6)
96
113
  activesupport (>= 4.2)
97
114
  aes_key_wrap
115
+ base64
98
116
  bindata
99
117
  faraday (~> 2.0)
100
118
  faraday-follow_redirects
101
- loofah (2.21.3)
119
+ loofah (2.22.0)
102
120
  crass (~> 1.0.2)
103
121
  nokogiri (>= 1.12.0)
104
122
  mail (2.8.1)
@@ -106,79 +124,96 @@ GEM
106
124
  net-imap
107
125
  net-pop
108
126
  net-smtp
109
- marcel (1.0.2)
110
- method_source (1.0.0)
111
- mini_mime (1.1.2)
112
- mini_portile2 (2.8.2)
113
- minitest (5.18.0)
114
- net-imap (0.3.4)
127
+ marcel (1.0.4)
128
+ mini_mime (1.1.5)
129
+ mini_portile2 (2.8.7)
130
+ minitest (5.24.0)
131
+ mutex_m (0.2.0)
132
+ net-http (0.4.1)
133
+ uri
134
+ net-imap (0.4.13)
115
135
  date
116
136
  net-protocol
117
137
  net-pop (0.1.2)
118
138
  net-protocol
119
- net-protocol (0.2.1)
139
+ net-protocol (0.2.2)
120
140
  timeout
121
- net-smtp (0.3.3)
141
+ net-smtp (0.5.0)
122
142
  net-protocol
123
- nio4r (2.5.9)
124
- nokogiri (1.15.2)
143
+ nio4r (2.7.3)
144
+ nokogiri (1.16.6)
125
145
  mini_portile2 (~> 2.8.2)
126
146
  racc (~> 1.4)
127
- racc (1.6.2)
128
- rack (2.2.7)
147
+ psych (5.1.2)
148
+ stringio
149
+ racc (1.8.0)
150
+ rack (3.1.3)
151
+ rack-session (2.0.0)
152
+ rack (>= 3.0.0)
129
153
  rack-test (2.1.0)
130
154
  rack (>= 1.3)
131
- rails (7.0.5)
132
- actioncable (= 7.0.5)
133
- actionmailbox (= 7.0.5)
134
- actionmailer (= 7.0.5)
135
- actionpack (= 7.0.5)
136
- actiontext (= 7.0.5)
137
- actionview (= 7.0.5)
138
- activejob (= 7.0.5)
139
- activemodel (= 7.0.5)
140
- activerecord (= 7.0.5)
141
- activestorage (= 7.0.5)
142
- activesupport (= 7.0.5)
155
+ rackup (2.1.0)
156
+ rack (>= 3)
157
+ webrick (~> 1.8)
158
+ rails (7.1.3.4)
159
+ actioncable (= 7.1.3.4)
160
+ actionmailbox (= 7.1.3.4)
161
+ actionmailer (= 7.1.3.4)
162
+ actionpack (= 7.1.3.4)
163
+ actiontext (= 7.1.3.4)
164
+ actionview (= 7.1.3.4)
165
+ activejob (= 7.1.3.4)
166
+ activemodel (= 7.1.3.4)
167
+ activerecord (= 7.1.3.4)
168
+ activestorage (= 7.1.3.4)
169
+ activesupport (= 7.1.3.4)
143
170
  bundler (>= 1.15.0)
144
- railties (= 7.0.5)
145
- rails-dom-testing (2.0.3)
146
- activesupport (>= 4.2.0)
171
+ railties (= 7.1.3.4)
172
+ rails-dom-testing (2.2.0)
173
+ activesupport (>= 5.0.0)
174
+ minitest
147
175
  nokogiri (>= 1.6)
148
176
  rails-html-sanitizer (1.6.0)
149
177
  loofah (~> 2.21)
150
178
  nokogiri (~> 1.14)
151
- railties (7.0.5)
152
- actionpack (= 7.0.5)
153
- activesupport (= 7.0.5)
154
- method_source
179
+ railties (7.1.3.4)
180
+ actionpack (= 7.1.3.4)
181
+ activesupport (= 7.1.3.4)
182
+ irb
183
+ rackup (>= 1.0.0)
155
184
  rake (>= 12.2)
156
- thor (~> 1.0)
157
- zeitwerk (~> 2.5)
158
- rake (13.0.6)
185
+ thor (~> 1.0, >= 1.2.2)
186
+ zeitwerk (~> 2.6)
187
+ rake (13.2.1)
188
+ rdoc (6.7.0)
189
+ psych (>= 4.0.0)
190
+ reline (0.5.9)
191
+ io-console (~> 0.5)
159
192
  rspec (3.12.0)
160
193
  rspec-core (~> 3.12.0)
161
194
  rspec-expectations (~> 3.12.0)
162
195
  rspec-mocks (~> 3.12.0)
163
- rspec-core (3.12.2)
196
+ rspec-core (3.12.3)
164
197
  rspec-support (~> 3.12.0)
165
- rspec-expectations (3.12.3)
198
+ rspec-expectations (3.12.4)
166
199
  diff-lcs (>= 1.2.0, < 2.0)
167
200
  rspec-support (~> 3.12.0)
168
- rspec-mocks (3.12.5)
201
+ rspec-mocks (3.12.7)
169
202
  diff-lcs (>= 1.2.0, < 2.0)
170
203
  rspec-support (~> 3.12.0)
171
- rspec-support (3.12.0)
172
- ruby2_keywords (0.0.5)
173
- thor (1.2.2)
204
+ rspec-support (3.12.2)
205
+ stringio (3.1.1)
206
+ thor (1.3.1)
174
207
  timecop (0.9.6)
175
- timeout (0.3.2)
208
+ timeout (0.4.1)
176
209
  tzinfo (2.0.6)
177
210
  concurrent-ruby (~> 1.0)
178
- websocket-driver (0.7.5)
211
+ uri (0.13.0)
212
+ webrick (1.8.1)
213
+ websocket-driver (0.7.6)
179
214
  websocket-extensions (>= 0.1.0)
180
215
  websocket-extensions (0.1.5)
181
- zeitwerk (2.6.8)
216
+ zeitwerk (2.6.16)
182
217
 
183
218
  PLATFORMS
184
219
  ruby
data/README.md CHANGED
@@ -5,7 +5,7 @@ This gem validates Keycloak JWT token for Ruby On Rails APIs.
5
5
  ## Install
6
6
 
7
7
  ```ruby
8
- gem "keycloak-api-rails", "0.12.0"
8
+ gem "keycloak-api-rails", "0.12.3"
9
9
  ```
10
10
 
11
11
  ## Token validation
@@ -20,11 +20,11 @@ module Keycloak
20
20
  @app.call(env)
21
21
  end
22
22
  rescue TokenError => e
23
+ logger.debug("The error causing the Token to fail: #{e.original_error&.message || e.message}")
23
24
  authentication_failed(e.message)
24
25
  end
25
26
 
26
27
  def authentication_failed(message)
27
- logger.info(message)
28
28
  [401, {"Content-Type" => "application/json"}, [ { error: message }.to_json]]
29
29
  end
30
30
 
@@ -1,3 +1,3 @@
1
1
  module Keycloak
2
- VERSION = "0.12.2"
2
+ VERSION = "0.12.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: keycloak-api-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.2
4
+ version: 0.12.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lorent Lempereur
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-06-03 00:00:00.000000000 Z
11
+ date: 2024-06-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -135,7 +135,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
135
135
  - !ruby/object:Gem::Version
136
136
  version: '0'
137
137
  requirements: []
138
- rubygems_version: 3.4.10
138
+ rubygems_version: 3.5.11
139
139
  signing_key:
140
140
  specification_version: 4
141
141
  summary: Rails middleware that validates Authorization token emitted by Keycloak