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 +4 -4
- data/lib/keycloak/api/user_resources.rb +3 -1
- data/lib/keycloak/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e506562cf3e553040e4f4f23a7f6f78ef40fc4a7
|
4
|
+
data.tar.gz: b2e074df8ee9aca46efb6f8e221db6d5a4593a65
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
data/lib/keycloak/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2019-08-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|