keycloak-admin 1.0.4 → 1.0.5

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: 0ee26761041b21a26002eedbd5f204e031a81e3b46b2a0942e3007873a95fd87
4
- data.tar.gz: 1933430211e65e88fc358b90dab200606e9b02e3870dc717ce0a57e977669e1c
3
+ metadata.gz: 5237b125d607832e7d0614d5a5955521aa5ee7bad1e45fc8860c3fdfa63befb0
4
+ data.tar.gz: 60728516e9c1b12dee46daeae629c623a6a274d2aaae4ed9f4aa69ae8624bfd3
5
5
  SHA512:
6
- metadata.gz: f9a2863c392f7bf68fb3a044ac30fc5bd183dc0e467595dcbe3999bbb82dca75d15eaeccf108b0ed5a6da147292b80db78e45ff8d5cbcc978a607cac8f1a98d4
7
- data.tar.gz: 163f9ccd4275159c64fb07e833413c40dc4f02f0d7dfced9300c4f776dade9ebb00184c7cfca72897dcc0ce9398ac772ee5e95cc007a2625f3f48ceca2cd3138
6
+ metadata.gz: 1d105d78cd7ce4aebf6032c01210b29ad8bba16dde885109246251da3c225978966b3b8fa4146acab8139556d4ccb905520451a079f32bc6885d190c01e01ebe
7
+ data.tar.gz: adc82de6f294e006af09e00d8f19077a3007ec02bfd585d695d30e2b156753bf39cee391f3fd74f1df9cb7acfe6057e632d6d33f092f98b61c9830aaefd112dd
data/CHANGELOG.md CHANGED
@@ -5,11 +5,12 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
- ## [1.0.3] - 2022-03-11
8
+ ## [1.0.5] - 2022-03-11
9
9
 
10
10
  * Create `Client`
11
11
  * Create `Identity Provider` (Breaking change: `IdentityProviderRepresentation.configuration` has been renamed to `IdentityProviderRepresentation.config`)
12
12
  * Add `Identity Provider Mapping`
13
+ * Find service account for a `Client`
13
14
 
14
15
  ## [1.0.1] - 2021-10-14
15
16
 
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- keycloak-admin (1.0.4)
4
+ keycloak-admin (1.0.5)
5
5
  http-cookie (~> 1.0, >= 1.0.3)
6
6
  rest-client (~> 2.0)
7
7
 
data/README.md CHANGED
@@ -12,7 +12,7 @@ This gem *does not* require Rails.
12
12
  For example, using `bundle`, add this line to your Gemfile.
13
13
 
14
14
  ```ruby
15
- gem "keycloak-admin", "1.0.4"
15
+ gem "keycloak-admin", "1.0.5"
16
16
  ```
17
17
 
18
18
  ## Login
@@ -21,6 +21,13 @@ module KeycloakAdmin
21
21
  JSON.parse(response).map { |client_as_hash| ClientRepresentation.from_hash(client_as_hash) }
22
22
  end
23
23
 
24
+ def get_service_account_user(client_id)
25
+ response = execute_http do
26
+ RestClient::Resource.new(service_account_user_url(client_id), @configuration.rest_client_options).get(headers)
27
+ end
28
+ UserRepresentation.from_hash(JSON.parse(response))
29
+ end
30
+
24
31
  def clients_url(id=nil)
25
32
  if id
26
33
  "#{@realm_client.realm_admin_url}/clients/#{id}"
@@ -28,5 +35,9 @@ module KeycloakAdmin
28
35
  "#{@realm_client.realm_admin_url}/clients"
29
36
  end
30
37
  end
38
+
39
+ def service_account_user_url(client_id)
40
+ "#{clients_url(client_id)}/service-account-user"
41
+ end
31
42
  end
32
43
  end
@@ -1,3 +1,3 @@
1
1
  module KeycloakAdmin
2
- VERSION = "1.0.4"
2
+ VERSION = "1.0.5"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: keycloak-admin
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lorent Lempereur