keycloak-ruby-client 0.0.6 → 0.0.7

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: 3cb38b642619a3555b01fb376a6339a3d549c243
4
- data.tar.gz: 925ca9ad46a8632213681fdc822ed0c029773df5
3
+ metadata.gz: e506562cf3e553040e4f4f23a7f6f78ef40fc4a7
4
+ data.tar.gz: b2e074df8ee9aca46efb6f8e221db6d5a4593a65
5
5
  SHA512:
6
- metadata.gz: 7741aceb16860d9931dbebc11d5e2ce10c688c362a5574232bf9a4b141020f72f20f53bc9c33ab617e5d1c24b81ba87e9d2074c5a4a653aea8eb1980b1ad9f4a
7
- data.tar.gz: 68a48f33549ff151c059acdf768233c6246d23ac4087a14bed8084b3a4fb269cf88a81b5ac2329d8f69d6b8386af66102b3c4be033e5210ad13817139b8f7f52
6
+ metadata.gz: ac725a942db34e82d87af10f9c9d2793903e5f57b6093a0bf37f830ab2ca1b75e8e7f449c5b466750aaf7b15659ba582f2371a57d98d139e992cca32a53a0194
7
+ data.tar.gz: b8fae9a84b37e6384999de49e6d1b643d12c0b119429cbb587cae3f67904223529ba99fc0035f565110b6687e4588895ae476921ce733f569fcc41cdde8bb3ae
@@ -14,11 +14,13 @@ module Keycloak
14
14
  #
15
15
  # @param user_rep [Keycloak::Model::UserRepresentation] user representation
16
16
  # @param roles [Array] an array of roles
17
+ # @return [String] id of the created user
17
18
  def create_user(user_rep, roles = [])
18
19
  res = post(user_resources_url, user_rep.to_json, headers: {content_type: :json})
19
20
  id = res.headers[:location].split("/")[-1]
20
- return if roles.empty?
21
+ return id if roles.empty?
21
22
  add_role_mapping(id, roles)
23
+ id
22
24
  end
23
25
 
24
26
  # @param id [String] user id
@@ -1,3 +1,3 @@
1
1
  module Keycloak
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: keycloak-ruby-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fuxin Hao
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-08-21 00:00:00.000000000 Z
11
+ date: 2019-08-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails