keycloak-admin 0.6 → 0.6.1

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
  SHA1:
3
- metadata.gz: 24748705bdb51378a194d5619011da0754aa0e1c
4
- data.tar.gz: 79a523aeedff44f1f27401733e4ef23a444cf4d8
3
+ metadata.gz: fce57d72b76ad0af7fe823e6dfa4871c71837ff4
4
+ data.tar.gz: 741c2f6c0fcf4a1e474a1790a06eb1ccdadcff01
5
5
  SHA512:
6
- metadata.gz: 6df37036270ff57a96df074cdd02a750ee599ec7213f63c58d9be5c81cac390441ba6bf377e28003d25dc1ff4efbfa678e7b56ecfd171bafd1ddf638417ffda3
7
- data.tar.gz: 08bfb61a6fc72f53bb178572650b677570f6be3ef140aa3d94fd04fb68194d85a76de294d02ac332219dd6743732017eccfe26487d9236312e2860deb7bfb2bf
6
+ metadata.gz: 84964e130793f44dc6822226faedb5d4ecff6357ac86835f3b64c8b77091c3c9a020aecea667069b3ddb4a46f7694c74dd87b2ddc4e6fb414b478de4aca507f0
7
+ data.tar.gz: 5d168422e6cdb800352139abc24dbfc3852ff5a5e2972797d0d4058b66fa37eb54c7ae83b9a5df804063df385e51db10b4d50d90138be91fe0a20a78461da07d
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- keycloak-admin (0.6)
4
+ keycloak-admin (0.6.1)
5
5
  http-cookie (~> 1.0, >= 1.0.3)
6
6
 
7
7
  GEM
@@ -9,7 +9,7 @@ GEM
9
9
  specs:
10
10
  byebug (9.1.0)
11
11
  diff-lcs (1.3)
12
- domain_name (0.5.20170404)
12
+ domain_name (0.5.20180417)
13
13
  unf (>= 0.0.5, < 1.0.0)
14
14
  http-cookie (1.0.3)
15
15
  domain_name (~> 0.5)
@@ -28,7 +28,7 @@ GEM
28
28
  rspec-support (3.7.0)
29
29
  unf (0.1.4)
30
30
  unf_ext
31
- unf_ext (0.0.7.4)
31
+ unf_ext (0.0.7.6)
32
32
 
33
33
  PLATFORMS
34
34
  ruby
@@ -39,4 +39,4 @@ DEPENDENCIES
39
39
  rspec (= 3.7.0)
40
40
 
41
41
  BUNDLED WITH
42
- 1.16.1
42
+ 1.16.3
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", "0.6"
15
+ gem "keycloak-admin", "0.6.1"
16
16
  ```
17
17
 
18
18
  ## Login
@@ -79,11 +79,11 @@ All options have a default value. However, all of them can be changed in your in
79
79
 
80
80
 
81
81
  ## Use Case
82
- exit
82
+
83
83
  ### Supported features
84
84
 
85
85
  * Get an access token
86
- * Create a user
86
+ * Create/update a user
87
87
  * Reset credentials
88
88
  * Delete a user
89
89
  * Impersonate a user
@@ -113,6 +113,16 @@ Returns the provided `user`, which must be of type `KeycloakAdmin::UserRepresent
113
113
  KeycloakAdmin.realm("a_realm").users.save(user)
114
114
  ```
115
115
 
116
+ ### Update a user
117
+
118
+ If you want to update its entire entity. To update some specific attributes, provide an object implementing `to_json`, such as a `Hash`.
119
+
120
+ ```ruby
121
+ KeycloakAdmin.realm("a_realm").users.update("05c135c6-5ad8-4e17-b1fa-635fc089fd71", {
122
+ email: "hello@gmail.com"
123
+ })
124
+ ```
125
+
116
126
  ### Create and save a user with password and a locale
117
127
 
118
128
  Returns the created user of type `KeycloakAdmin::UserRepresentation`.
@@ -18,6 +18,10 @@ module KeycloakAdmin
18
18
  user_representation
19
19
  end
20
20
 
21
+ def update(user_id, user_representation_body)
22
+ RestClient.put(users_url(user_id), user_representation.to_json, headers)
23
+ end
24
+
21
25
  def search(query)
22
26
  response = execute_http do
23
27
  RestClient.get(users_url, headers.merge({params: { search: query }}))
@@ -1,3 +1,3 @@
1
1
  module KeycloakAdmin
2
- VERSION = "0.6"
2
+ VERSION = "0.6.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: keycloak-admin
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.6'
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lorent Lempereur
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-03-06 00:00:00.000000000 Z
11
+ date: 2019-05-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: http-cookie