hydra-keycloak-client 0.1.5 → 0.1.6

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: c1c2501b9655a228734d10a9d4c1faad122811861727dc8aa66e10b4219e9a12
4
- data.tar.gz: 3c86bc796eb4377e4a5defcfb75b908ada14386f10386abe745c2472959137c5
3
+ metadata.gz: 18c487395b0610c378e53e63bd831b32c74f599f4fcd7fad8827698bd645dcfc
4
+ data.tar.gz: 0b31711516d5f351b1c82bca9164462f124595eb40d7dc790316e6d43c7c08b0
5
5
  SHA512:
6
- metadata.gz: eb1200c121405ff86550a47bbf646b15f658e9a95125ad54317768f58b2d05604a97d6c24939d5817fed75c7551fac59f47b1934a7d579092f99cdb8cac6fdde
7
- data.tar.gz: 02ec5a5fc49112fb2f2dc9e09b8828e47cf69e9d23628d3dacae0ea0dfbfcd284be162a42e86bd3cecb5290c42241df616a88607d05c86afbcf1ce7886e0d118
6
+ metadata.gz: 0ed1cb5e7793a4ab45473551345d1ee6eca95d8ad349e3fd9023cd5f7282edf4cdcc87598bb9bc86de2797cc3ff0198d6f458817f0ded485745ef4d4dc3229da
7
+ data.tar.gz: 925857eea90aa7a6008f66febe1dadfa02820f72c0ca5ae2ec7cd24c20890c417a5268f2ad033084782d141706d47449f27d6c0797ef6b77e6899922f2ccc1d3
data/Gemfile CHANGED
@@ -6,14 +6,4 @@ gemspec
6
6
  gem "rake", "~> 12.0"
7
7
  gem "rspec", "~> 3.0"
8
8
 
9
- gem 'jwt'
10
- gem 'dalli'
11
- gem 'redis'
12
-
13
- gem 'dry-monads'
14
- gem 'dry-auto_inject'
15
- gem 'dry-container'
16
- gem 'dry-schema'
17
- gem 'dry-struct'
18
-
19
9
  gem 'pry'
data/Gemfile.lock CHANGED
@@ -1,7 +1,15 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- hydra-keycloak-client (0.1.4)
4
+ hydra-keycloak-client (0.1.5)
5
+ dalli
6
+ dry-auto_inject
7
+ dry-container
8
+ dry-monads
9
+ dry-schema
10
+ dry-struct
11
+ jwt
12
+ redis
5
13
 
6
14
  GEM
7
15
  remote: https://rubygems.org/
@@ -71,17 +79,9 @@ PLATFORMS
71
79
  ruby
72
80
 
73
81
  DEPENDENCIES
74
- dalli
75
- dry-auto_inject
76
- dry-container
77
- dry-monads
78
- dry-schema
79
- dry-struct
80
82
  hydra-keycloak-client!
81
- jwt
82
83
  pry
83
84
  rake (~> 12.0)
84
- redis
85
85
  rspec (~> 3.0)
86
86
 
87
87
  BUNDLED WITH
data/README.md CHANGED
@@ -25,14 +25,25 @@ Create client instance for usage:
25
25
  ```
26
26
  keycloack_client = Hydra::Keycloak::ClientCreator.call(
27
27
  config: {
28
- auth_server_url: "http://0.0.0.0:8080/auth/",
29
- realm: "hydra",
30
- client_id: "hoper",
31
- redirect_uri: "http://localhost:3000/authenticate_by_keycloak",
32
- secret: "1fad7395-de0e-456a-a559-2896aa82f5e3",
33
- logout_redirect: "http://localhost:3000",
34
- memcached_host: "localhost",
35
- memcached_port: "11211",
36
- memcached_namespace: "hoper",
28
+ auth_server_url: keycloak_config.fetch(:auth_server_url),
29
+ realm: keycloak_config.fetch(:realm),
30
+ client_id: keycloak_config.fetch(:client_id),
31
+ redirect_uri: keycloak_config.fetch(:redirect_uri),
32
+ secret: keycloak_config.fetch(:secret),
33
+ logout_redirect: keycloak_config.fetch(:logout_redirect),
34
+ store_client: 'redis',
35
+ store_client_options: {redis_host: ENV['REDIS_HOST'], redis_port: ENV['REDIS_PORT']}
37
36
  })
38
37
  ```
38
+
39
+ or for memcached:
40
+
41
+ ```
42
+ ...
43
+ store_client: 'redis',
44
+ store_client_options: {
45
+ memcached_host: "localhost",
46
+ memcached_port: "11211",
47
+ memcached_namespace: "hoper",
48
+ }
49
+ ```
@@ -25,4 +25,14 @@ Gem::Specification.new do |spec|
25
25
  end
26
26
  spec.bindir = "bin"
27
27
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
28
+
29
+ spec.add_dependency('jwt')
30
+ spec.add_dependency('dalli')
31
+ spec.add_dependency('redis')
32
+
33
+ spec.add_dependency('dry-monads')
34
+ spec.add_dependency('dry-auto_inject')
35
+ spec.add_dependency('dry-container')
36
+ spec.add_dependency('dry-schema')
37
+ spec.add_dependency('dry-struct')
28
38
  end
@@ -68,13 +68,13 @@ module Hydra
68
68
 
69
69
  ::Hydra::Keycloak::Store::RedisClient.new
70
70
  end
71
- else validated_config[:store_client] == 'memcached'
71
+ elsif validated_config[:store_client] == 'memcached'
72
72
  container.register :dalli do
73
73
  require 'dalli'
74
74
 
75
75
  ::Dalli::Client.new(
76
- "#{validated_config[:memcached_host]}:#{validated_config[:memcached_port]}",
77
- namespace: validated_config[:memcached_namespace]
76
+ "#{validated_config[:store_client_options][:memcached_host]}:#{validated_config[:store_client_options][:memcached_port]}",
77
+ namespace: validated_config[:store_client_options][:memcached_namespace]
78
78
  )
79
79
  end
80
80
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Hydra
4
4
  module Keycloak
5
- VERSION = '0.1.5'
5
+ VERSION = '0.1.6'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,15 +1,127 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hydra-keycloak-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fedor Kosolapov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-02-09 00:00:00.000000000 Z
12
- dependencies: []
11
+ date: 2022-02-16 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: jwt
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: dalli
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: redis
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: dry-monads
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'
69
+ - !ruby/object:Gem::Dependency
70
+ name: dry-auto_inject
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: dry-container
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :runtime
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: dry-schema
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :runtime
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: dry-struct
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :runtime
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
13
125
  description: Keycloak client for SSO
14
126
  email:
15
127
  - f.kosolapov@latera.ru