keycloak 2.5.0 → 2.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +7 -2
- data/README.pt-BR.md +9 -2
- data/lib/generators/keycloak.rb +3 -1
- data/lib/generators/keycloak/config/config_generator.rb +10 -0
- data/lib/keycloak/version.rb +1 -1
- metadata +2 -2
- data/lib/generators/initializer_generator.rb +0 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 52da55a01a2b3a18934d2fd52092786d8b2efaf0f3d6f72d09757dff97f3241f
|
4
|
+
data.tar.gz: 6e8008d60572da3bdd56de6cd647a0e3a9ff59218b43b7e7248ce4d54201c106
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c9b7f0911880f3f28b0135f54175e837086e8f816b7406a96b97e4fa94b9a0237d1501ff2754cb93b2d68a8fa8d274e6db534b4ab315509d347267b74f2cc657
|
7
|
+
data.tar.gz: cfb6bb9d8d7872594a408f6c1c13425747af5a0378abac367c3e291b9695ae6f76d2f98d1af44d3e445867c4d05ccdf2f0ad66669da2735f05301d31a863f288
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -28,7 +28,7 @@ Or install it yourself:
|
|
28
28
|
|
29
29
|
To add the configuration file:
|
30
30
|
|
31
|
-
$ rails generate
|
31
|
+
$ rails generate keycloak:config
|
32
32
|
|
33
33
|
|
34
34
|
## Use
|
@@ -101,7 +101,6 @@ end
|
|
101
101
|
```
|
102
102
|
This way, every time gem needs to use the token information to consume a Keycloak service, it will invoke this lambda method.
|
103
103
|
|
104
|
-
|
105
104
|
```ruby
|
106
105
|
Keycloak.proc_external_attributes
|
107
106
|
```
|
@@ -122,6 +121,12 @@ end
|
|
122
121
|
|
123
122
|
<b>Note:</b> The `Keycloak.proc_cookie_token` and `Keycloak.proc_external_attributes` attributes can be defined in the `initialize` of the controller `ApplicationController`.
|
124
123
|
|
124
|
+
```ruby
|
125
|
+
Keycloak.validate_token_when_call_has_role
|
126
|
+
```
|
127
|
+
|
128
|
+
The introspect of the token will be executed every time the `Keycloak::Client.has_role?` method is invoked, if this setting is set to `true`.
|
129
|
+
|
125
130
|
|
126
131
|
### Keycloak::Client
|
127
132
|
|
data/README.pt-BR.md
CHANGED
@@ -22,10 +22,10 @@ Então execute:
|
|
22
22
|
Ou instale você mesmo:
|
23
23
|
|
24
24
|
$ gem install keycloak
|
25
|
-
|
25
|
+
|
26
26
|
Para adicionar o arquivo de configuração:
|
27
27
|
|
28
|
-
$ rails generate
|
28
|
+
$ rails generate keycloak:config
|
29
29
|
|
30
30
|
## Utilização
|
31
31
|
|
@@ -116,6 +116,13 @@ end
|
|
116
116
|
<b>Observação:</b> Os atributos `Keycloak.proc_cookie_token` e `Keycloak.proc_external_attributes` podem ser definidos no `initialize` do controller `ApplicationController`.
|
117
117
|
|
118
118
|
|
119
|
+
```ruby
|
120
|
+
Keycloak.validate_token_when_call_has_role
|
121
|
+
```
|
122
|
+
|
123
|
+
Será executado o introspect do token todas as vezes que o método `Keycloak::Client.has_role?` for invocado, caso esta configuração esteja setada como `true`.
|
124
|
+
|
125
|
+
|
119
126
|
### Keycloak::Client
|
120
127
|
|
121
128
|
O módulo `Keycloak::Client` possui os métodos que representam os serviços de <b>endpoints</b>. Esses serviços são fundamentais para a criação e atualização de tokens, efetuação de login e logout, e, também para a obtenção de informações sintéticas de um usuário logado. O que habilita a gem a fazer uso de todos esses serviços é o arquivo de instalação do client citado anteriormente.
|
data/lib/generators/keycloak.rb
CHANGED
@@ -7,4 +7,6 @@ Keycloak.keycloak_controller = 'session'
|
|
7
7
|
# relm name (only if the installation file is not present)
|
8
8
|
Keycloak.realm = ''
|
9
9
|
# relm url (only if the installation file is not present)
|
10
|
-
Keycloak.auth_server_url = ''
|
10
|
+
Keycloak.auth_server_url = ''
|
11
|
+
# The introspect of the token will be executed every time the Keycloak::Client.has_role? method is invoked, if this setting is set to true.
|
12
|
+
Keycloak.validate_token_when_call_has_role = false
|
data/lib/keycloak/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: keycloak
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.5.
|
4
|
+
version: 2.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Guilherme Portugues
|
@@ -115,8 +115,8 @@ files:
|
|
115
115
|
- bin/console
|
116
116
|
- bin/setup
|
117
117
|
- keycloak.gemspec
|
118
|
-
- lib/generators/initializer_generator.rb
|
119
118
|
- lib/generators/keycloak.rb
|
119
|
+
- lib/generators/keycloak/config/config_generator.rb
|
120
120
|
- lib/keycloak.rb
|
121
121
|
- lib/keycloak/exceptions.rb
|
122
122
|
- lib/keycloak/version.rb
|