keycloak_rails 1.0.0.pre.beta.6.1 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -3
- data/lib/keycloak_rails/client.rb +2 -2
- data/lib/keycloak_rails/user.rb +1 -1
- data/lib/keycloak_rails/version.rb +1 -1
- data/lib/keycloak_rails.rb +1 -1
- metadata +11 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eaae695b0e697196e7059185596567bbf27564fe9839c600429735e41c8b6f66
|
4
|
+
data.tar.gz: e7b4e12b24c659c911e964f490b6f2d15d7c78c8d98ebe0b10ac52585708f28b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ca9e61b974db97d1a6424d93bf87f0dc3902fce6b1276da949b55abdeaf3c9e2ed5f36587c1d951e097f071cc6dc09d9d8f1d86f322510867417de87e6fc1a50
|
7
|
+
data.tar.gz: a9a3d62d8ea7e3e633c542902e32610bfec425ed27d0a67a501f7fc168eae48dd47db4f160be58754384c37242d929ec38d07e957047b7ad4f3264b403c5a824
|
data/README.md
CHANGED
@@ -28,12 +28,12 @@ $ gem install keycloak_rails
|
|
28
28
|
```
|
29
29
|
|
30
30
|
## Getting started
|
31
|
-
to generate
|
31
|
+
to generate keycloak_rails initializer execute:
|
32
32
|
```bash
|
33
33
|
$ bundle exec rails g keycloak_rails:config
|
34
34
|
```
|
35
35
|
|
36
|
-
go to `config/initializers/
|
36
|
+
go to `config/initializers/keycloak_rails.rb`
|
37
37
|
|
38
38
|
where you will find
|
39
39
|
```ruby
|
@@ -117,7 +117,7 @@ end
|
|
117
117
|
|
118
118
|
#### KeycloakRails::Controller::Registrations
|
119
119
|
***
|
120
|
-
The main idea behind
|
120
|
+
The main idea behind keycloak_rails is to make adding sso easy to an existing rails app thats already in prod, and the registrations module is the backbone to achive that.
|
121
121
|
|
122
122
|
In your app
|
123
123
|
|
@@ -21,7 +21,7 @@ module KeycloakRails
|
|
21
21
|
end
|
22
22
|
|
23
23
|
def current_user_has_active_session?
|
24
|
-
KeycloakRails.
|
24
|
+
KeycloakRails.current_session_cookie && current_cookie_active?
|
25
25
|
end
|
26
26
|
|
27
27
|
def current_cookie_active?
|
@@ -34,7 +34,7 @@ module KeycloakRails
|
|
34
34
|
request = @curl.post(path: KeycloakRails.openid_config['introspection_endpoint'],
|
35
35
|
headers: { 'Authorization': basic_auth_token,
|
36
36
|
'Content-Type': 'application/x-www-form-urlencoded' },
|
37
|
-
body: { "token": KeycloakRails.
|
37
|
+
body: { "token": KeycloakRails.current_session_cookie })
|
38
38
|
raise StandardError, request[:response] unless request[:status] == :ok
|
39
39
|
|
40
40
|
request[:response]
|
data/lib/keycloak_rails/user.rb
CHANGED
data/lib/keycloak_rails.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: keycloak_rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.0
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Omar Luqman
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-03-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dry-configurable
|
@@ -58,14 +58,14 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 6.
|
61
|
+
version: 6.1.7
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: 6.
|
68
|
+
version: 6.1.7
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: fasterer
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -124,7 +124,7 @@ dependencies:
|
|
124
124
|
version: '0'
|
125
125
|
description: A rails wrapper for open source SSO project Keycloak.
|
126
126
|
email:
|
127
|
-
-
|
127
|
+
- omaralanii@outlook.com
|
128
128
|
executables: []
|
129
129
|
extensions: []
|
130
130
|
extra_rdoc_files: []
|
@@ -150,12 +150,12 @@ files:
|
|
150
150
|
- lib/keycloak_rails/engine.rb
|
151
151
|
- lib/keycloak_rails/user.rb
|
152
152
|
- lib/keycloak_rails/version.rb
|
153
|
-
homepage: https://github.com/
|
153
|
+
homepage: https://github.com/omarluq/keycloak_rails
|
154
154
|
licenses:
|
155
155
|
- MIT
|
156
156
|
metadata:
|
157
|
-
homepage_uri: https://github.com/
|
158
|
-
source_code_uri: https://github.com/
|
157
|
+
homepage_uri: https://github.com/omarluq/keycloak_rails
|
158
|
+
source_code_uri: https://github.com/omarluq/keycloak_rails
|
159
159
|
post_install_message:
|
160
160
|
rdoc_options: []
|
161
161
|
require_paths:
|
@@ -167,11 +167,11 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
167
167
|
version: 2.6.0
|
168
168
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
169
169
|
requirements:
|
170
|
-
- - "
|
170
|
+
- - ">="
|
171
171
|
- !ruby/object:Gem::Version
|
172
|
-
version:
|
172
|
+
version: '0'
|
173
173
|
requirements: []
|
174
|
-
rubygems_version: 3.3.
|
174
|
+
rubygems_version: 3.3.25
|
175
175
|
signing_key:
|
176
176
|
specification_version: 4
|
177
177
|
summary: "%q{API wrapper for Key Cloak SSO server.}"
|