hydra-keycloak-client 0.1.15 → 0.1.17
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +3 -0
- data/Dockerfile.release +1 -1
- data/Dockerfile.test +1 -1
- data/Gemfile.lock +28 -25
- data/lib/hydra/keycloak/client.rb +20 -10
- data/lib/hydra/keycloak/tokens/gateway.rb +1 -1
- data/lib/hydra/keycloak/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 61046cc3cd3ab5bc987ab0769799054193795ad82fca2ca46450b3cd6a1d1c44
|
4
|
+
data.tar.gz: 408a84fdaa9a9d769e54a6bfb57fba5bcfdc9c74fe158e3062128b53a29e9a37
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bd7d6888768745cc897b554ec7f8342e12ec879258eafe967a947a2c902af32ba0e7ba4b46b3dc1c7b826b2f99962f8112698fbb50484951100ab6ff4ed64f0c
|
7
|
+
data.tar.gz: e82f992be649e2d1923df2fdff0292a5b906e82c61082671f5fecb038c4dd3cd40d567e6f05b413d35b5ab8df99bf0d031c3e56b32ae2c0b8f435822a8734d86
|
data/.gitignore
CHANGED
data/Dockerfile.release
CHANGED
data/Dockerfile.test
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
hydra-keycloak-client (0.1.
|
4
|
+
hydra-keycloak-client (0.1.17)
|
5
5
|
dry-auto_inject
|
6
6
|
dry-container
|
7
7
|
dry-monads
|
@@ -14,31 +14,34 @@ GEM
|
|
14
14
|
specs:
|
15
15
|
ast (2.4.2)
|
16
16
|
coderay (1.1.3)
|
17
|
-
concurrent-ruby (1.
|
17
|
+
concurrent-ruby (1.2.0)
|
18
18
|
connection_pool (2.3.0)
|
19
|
-
dalli (3.2.
|
20
|
-
diff-lcs (1.
|
19
|
+
dalli (3.2.0)
|
20
|
+
diff-lcs (1.5.0)
|
21
21
|
docile (1.4.0)
|
22
|
-
dry-auto_inject (0.
|
22
|
+
dry-auto_inject (0.7.0)
|
23
23
|
dry-container (>= 0.3.4)
|
24
|
-
dry-configurable (0.
|
24
|
+
dry-configurable (0.12.1)
|
25
25
|
concurrent-ruby (~> 1.0)
|
26
|
-
dry-core (~> 0.
|
27
|
-
dry-container (0.
|
26
|
+
dry-core (~> 0.5, >= 0.5.0)
|
27
|
+
dry-container (0.7.2)
|
28
28
|
concurrent-ruby (~> 1.0)
|
29
|
-
|
29
|
+
dry-configurable (~> 0.1, >= 0.1.3)
|
30
|
+
dry-core (0.6.0)
|
30
31
|
concurrent-ruby (~> 1.0)
|
31
|
-
dry-
|
32
|
-
dry-
|
32
|
+
dry-equalizer (0.3.0)
|
33
|
+
dry-inflector (0.2.0)
|
34
|
+
dry-initializer (3.0.4)
|
33
35
|
dry-logic (1.2.0)
|
34
36
|
concurrent-ruby (~> 1.0)
|
35
37
|
dry-core (~> 0.5, >= 0.5)
|
36
|
-
dry-monads (1.
|
38
|
+
dry-monads (1.3.5)
|
37
39
|
concurrent-ruby (~> 1.0)
|
38
|
-
dry-core (~> 0.
|
39
|
-
|
40
|
+
dry-core (~> 0.4, >= 0.4.4)
|
41
|
+
dry-equalizer
|
42
|
+
dry-schema (1.6.2)
|
40
43
|
concurrent-ruby (~> 1.0)
|
41
|
-
dry-configurable (~> 0.
|
44
|
+
dry-configurable (~> 0.8, >= 0.8.3)
|
42
45
|
dry-core (~> 0.5, >= 0.5)
|
43
46
|
dry-initializer (~> 3.0)
|
44
47
|
dry-logic (~> 1.0)
|
@@ -54,17 +57,17 @@ GEM
|
|
54
57
|
dry-inflector (~> 0.1, >= 0.1.2)
|
55
58
|
dry-logic (~> 1.0, >= 1.0.2)
|
56
59
|
ice_nine (0.11.2)
|
57
|
-
jwt (2.
|
60
|
+
jwt (2.7.0)
|
58
61
|
method_source (1.0.0)
|
59
62
|
parallel (1.21.0)
|
60
63
|
parser (3.1.1.0)
|
61
64
|
ast (~> 2.4.1)
|
62
|
-
pry (0.14.
|
65
|
+
pry (0.14.2)
|
63
66
|
coderay (~> 1.1)
|
64
67
|
method_source (~> 1.0)
|
65
68
|
rainbow (3.1.1)
|
66
69
|
rake (12.3.3)
|
67
|
-
redis (5.0.
|
70
|
+
redis (5.0.6)
|
68
71
|
redis-client (>= 0.9.0)
|
69
72
|
redis-client (0.11.2)
|
70
73
|
connection_pool
|
@@ -74,16 +77,16 @@ GEM
|
|
74
77
|
rspec-core (~> 3.10.0)
|
75
78
|
rspec-expectations (~> 3.10.0)
|
76
79
|
rspec-mocks (~> 3.10.0)
|
77
|
-
rspec-core (3.10.
|
80
|
+
rspec-core (3.10.2)
|
78
81
|
rspec-support (~> 3.10.0)
|
79
|
-
rspec-expectations (3.10.
|
82
|
+
rspec-expectations (3.10.2)
|
80
83
|
diff-lcs (>= 1.2.0, < 2.0)
|
81
84
|
rspec-support (~> 3.10.0)
|
82
|
-
rspec-mocks (3.10.
|
85
|
+
rspec-mocks (3.10.3)
|
83
86
|
diff-lcs (>= 1.2.0, < 2.0)
|
84
87
|
rspec-support (~> 3.10.0)
|
85
88
|
rspec-support (3.10.3)
|
86
|
-
rubocop (1.
|
89
|
+
rubocop (1.27.0)
|
87
90
|
parallel (~> 1.10)
|
88
91
|
parser (>= 3.1.0.0)
|
89
92
|
rainbow (>= 2.2.2, < 4.0)
|
@@ -95,7 +98,7 @@ GEM
|
|
95
98
|
rubocop-ast (1.16.0)
|
96
99
|
parser (>= 3.1.1.0)
|
97
100
|
ruby-progressbar (1.11.0)
|
98
|
-
simplecov (0.
|
101
|
+
simplecov (0.22.0)
|
99
102
|
docile (~> 1.1)
|
100
103
|
simplecov-html (~> 0.11)
|
101
104
|
simplecov_json_formatter (~> 0.1)
|
@@ -104,7 +107,7 @@ GEM
|
|
104
107
|
simplecov (~> 0.19)
|
105
108
|
simplecov-html (0.12.3)
|
106
109
|
simplecov_json_formatter (0.1.4)
|
107
|
-
unicode-display_width (2.
|
110
|
+
unicode-display_width (2.4.2)
|
108
111
|
|
109
112
|
PLATFORMS
|
110
113
|
ruby
|
@@ -121,4 +124,4 @@ DEPENDENCIES
|
|
121
124
|
simplecov-cobertura
|
122
125
|
|
123
126
|
BUNDLED WITH
|
124
|
-
2.3.
|
127
|
+
2.3.26
|
@@ -73,9 +73,9 @@ module Hydra
|
|
73
73
|
def register_store_client(config)
|
74
74
|
case config.fetch(:store_client)
|
75
75
|
when 'redis'
|
76
|
-
register_redis_store(config.fetch(:store_client_options))
|
76
|
+
register_redis_store(**config.fetch(:store_client_options))
|
77
77
|
when 'memcached'
|
78
|
-
register_memcached_store(config.fetch(:store_client_options))
|
78
|
+
register_memcached_store(**config.fetch(:store_client_options))
|
79
79
|
end
|
80
80
|
end
|
81
81
|
|
@@ -127,7 +127,12 @@ module Hydra
|
|
127
127
|
class Client
|
128
128
|
extend ::Hydra::Keycloak::Mixin
|
129
129
|
include ::Dry::Monads[:result, :do]
|
130
|
-
inject[
|
130
|
+
inject[
|
131
|
+
'urls',
|
132
|
+
'tokens_repo',
|
133
|
+
'store',
|
134
|
+
'code_verifier'
|
135
|
+
]
|
131
136
|
|
132
137
|
def auth_url
|
133
138
|
code_verifier.generate
|
@@ -196,11 +201,11 @@ module Hydra
|
|
196
201
|
end
|
197
202
|
|
198
203
|
def logout!(session_state)
|
199
|
-
fetch_token(session_state, 'id_token')
|
200
|
-
clear_tokens(session_state)
|
204
|
+
id_token = yield fetch_token(session_state, 'id_token')
|
201
205
|
|
202
|
-
|
203
|
-
|
206
|
+
yield clear_tokens(session_state)
|
207
|
+
|
208
|
+
Success(urls.end_session_url(id_token.source))
|
204
209
|
end
|
205
210
|
|
206
211
|
def introspect_token(token)
|
@@ -224,9 +229,14 @@ module Hydra
|
|
224
229
|
end
|
225
230
|
|
226
231
|
def clear_tokens(session_state)
|
227
|
-
|
228
|
-
|
229
|
-
|
232
|
+
Dry::Monads::List[
|
233
|
+
"#{session_state}_access_token",
|
234
|
+
"#{session_state}_id_token",
|
235
|
+
"#{session_state}_refresh_token"
|
236
|
+
]
|
237
|
+
.fmap { |x| store.delete(x) }
|
238
|
+
.typed(Dry::Monads::Result)
|
239
|
+
.traverse
|
230
240
|
end
|
231
241
|
|
232
242
|
def token_expired?(token)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hydra-keycloak-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.17
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Fedor Kosolapov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-02-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jwt
|
@@ -154,7 +154,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
154
154
|
- !ruby/object:Gem::Version
|
155
155
|
version: '0'
|
156
156
|
requirements: []
|
157
|
-
rubygems_version: 3.1
|
157
|
+
rubygems_version: 3.4.1
|
158
158
|
signing_key:
|
159
159
|
specification_version: 4
|
160
160
|
summary: Keycloak client for SSO
|