keycloak 2.4.0 → 2.4.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d419a683b8c5acc4e90870947280ad4953e44ffe3a91fc231afc9ed8665226d1
4
- data.tar.gz: 523aa9997cbacb76ef37a2617b685cc9a919219b2511cd79bd38da0114ca1ccb
3
+ metadata.gz: 0aa2abcfd866bb390cc92962cf088157dd788d9ce1c1fb631f9c0199fda1cf1b
4
+ data.tar.gz: 7a5aca5bde76e62d3f73ef9c0a6c93b24b2f7ce4bba50af1c705863865dfd117
5
5
  SHA512:
6
- metadata.gz: a5776f216a4ef94247922c5b4837785ab71bb6611fe0bf6cc9f86f30847ae140f6d10634e969e7e3c682d1c87598077a54c387ae6a7f52dbd5582e3d2c17775e
7
- data.tar.gz: 93d76cc19f4d93efe21bf7697a4f345818f22faaead39ad8376bca6d953dd173781b04877e8f2b32485673195aefeb710cd7a986ce655bf26a754915e75b6247
6
+ metadata.gz: 61ab8f0777733efc2102a86cb340222dcd12ba335d0661c9b7d9a4f2f3a98f53c67ec2755e3301c8d629a36f565d78b7608460a67acf19e92d493fd0b2d843d3
7
+ data.tar.gz: 38cb5b38f55074a6db68f13366cb625ba77487b12c1ff9360f42bac3a05adbf68b361da52fdc2475e50ee0f8863ef3c710c56f1dee386c8cc308a47a014838cc
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- keycloak (2.4.0)
4
+ keycloak (2.4.1)
5
5
  json
6
6
  jwt
7
7
  rest-client
data/README.md CHANGED
@@ -318,6 +318,14 @@ Keycloak::Admin.get_role_mappings(id, access_token = nil)
318
318
  `get_role_mappings` returns all <b>Role Mappings</b> in the realm assigned to the user identified by the `id` parameter, regardless of the Client.
319
319
 
320
320
 
321
+ ```ruby
322
+ # GET /admin/realms/{realm}/groups
323
+ Keycloak::Admin.get_groups(query_parameters = nil, access_token = nil)
324
+ ```
325
+
326
+ `get_groups` returns a list of [GroupRepresentation](http://www.keycloak.org/docs-api/3.2/rest-api/index.html#_grouprepresentation) for the realm. The optional `query_parameters` parameter expects a hash with properties matching any of the [query parameters](https://www.keycloak.org/docs-api/3.2/rest-api/index.html#_groups_resource) accepted by the API.
327
+
328
+
321
329
  ```ruby
322
330
  # GET /admin/realms/{realm}/clients
323
331
  Keycloak::Admin.get_clients(query_parameters = nil, access_token = nil)
@@ -441,6 +449,13 @@ Keycloak::Internal.get_users(query_parameters = nil, client_id = '', secret = ''
441
449
  `get_users` invokes the `Keycloak::Admin.get_users` method that returns a list of users, filtered according to the parameters hash passed in `query_parameters`.
442
450
 
443
451
 
452
+ ```ruby
453
+ Keycloak::Internal.get_groups(query_parameters = nil, client_id = '', secret = '')
454
+ ```
455
+
456
+ `get_groups` invokes the `Keycloak::Admin.get_groups` method that returns the group hierarchy for the realm, filtered according to the parameters hash passed in `query_parameters`.
457
+
458
+
444
459
  ```ruby
445
460
  Keycloak::Internal.change_password(user_id, redirect_uri = '', client_id = '', secret = '')
446
461
  ```
@@ -313,6 +313,13 @@ Keycloak::Admin.get_role_mappings(id, access_token = nil)
313
313
 
314
314
  `get_role_mappings` retorna todas as <b>Role Mappings</b> do reino atribuídas ao usuário identificado pelo parâmetro `id`, independentemente do Client.
315
315
 
316
+ ```ruby
317
+ # GET /admin/realms/{realm}/groups
318
+ Keycloak::Admin.get_groups(query_parameters = nil, access_token = nil)
319
+ ```
320
+
321
+ `get_groups` retorna a lista de [GroupRepresentation](http://www.keycloak.org/docs-api/3.2/rest-api/index.html#_grouprepresentation) do reino. O parâmetro opcional `query_parameters` espera um hash com propriedades correspondentes a qualquer um dos [query parameters](https://www.keycloak.org/docs-api/3.2/rest-api/index.html#_groups_resource) aceitos pela API.
322
+
316
323
 
317
324
  ```ruby
318
325
  # GET /admin/realms/{realm}/clients
@@ -439,6 +446,12 @@ Keycloak::Internal.get_users(query_parameters = nil, client_id = '', secret = ''
439
446
 
440
447
  `get_users` invoca o método `Keycloak::Admin.get_users` que, por sua vez, retorna uma lista de usuários, filtrada de acordo com o hash de parâmetros passado em `query_parameters`.
441
448
 
449
+ ```ruby
450
+ Keycloak::Internal.get_groups(query_parameters = nil, client_id = '', secret = '')
451
+ ```
452
+
453
+ `get_groups` invoca o método `Keycloak::Admin.get_groups` que retonar a hierarquia dos grupos do reino, filtrado de acordo com o hash passado no parâmetro `query_parameters`.
454
+
442
455
 
443
456
  ```ruby
444
457
  Keycloak::Internal.change_password(user_id, redirect_uri = '', client_id = '', secret = '')
@@ -450,6 +450,10 @@ module Keycloak
450
450
  generic_get("users/#{id}/role-mappings", nil, access_token)
451
451
  end
452
452
 
453
+ def self.get_groups(query_parameters = nil, access_token = nil)
454
+ generic_get("groups/", query_parameters, access_token)
455
+ end
456
+
453
457
  def self.get_clients(query_parameters = nil, access_token = nil)
454
458
  generic_get("clients/", query_parameters, access_token)
455
459
  end
@@ -583,6 +587,17 @@ module Keycloak
583
587
  default_call(proc, client_id, secret)
584
588
  end
585
589
 
590
+ def self.get_groups(query_parameters = nil, client_id = '', secret = '')
591
+ client_id = Keycloak::Client.client_id if client_id.blank?
592
+ secret = Keycloak::Client.secret if secret.blank?
593
+
594
+ proc = lambda {|token|
595
+ Keycloak::Admin.get_groups(query_parameters, token["access_token"])
596
+ }
597
+
598
+ default_call(proc, client_id, secret)
599
+ end
600
+
586
601
  def self.change_password(user_id, redirect_uri = '', client_id = '', secret = '')
587
602
  client_id = Keycloak::Client.client_id if client_id.blank?
588
603
  secret = Keycloak::Client.secret if secret.blank?
@@ -1,3 +1,3 @@
1
1
  module Keycloak
2
- VERSION = "2.4.0"
2
+ VERSION = "2.4.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: keycloak
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.0
4
+ version: 2.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Guilherme Portugues
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-12-06 00:00:00.000000000 Z
11
+ date: 2019-01-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler