keycloak 2.2.2 → 2.2.3

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: b4049ff4cd3aa28843c716f1087015fe93b8f293
4
- data.tar.gz: dfd32b98b0dde41107f0dbd9b93c0031bf76fc47
3
+ metadata.gz: 56394d9a2afd46a62e144d429b830845c0cd0efd
4
+ data.tar.gz: 0b8bd943c94758bae77966c704149f6b7164580e
5
5
  SHA512:
6
- metadata.gz: b14927bbff9d4213c5b36cb0ebe5d78b887d1106183a71a363c8996b972fc3f32481ec7d3986658f3326b5a7764e9af7619e52d29f4fa188fdbe79f3075e5158
7
- data.tar.gz: a21406c6aa9ed8406c86dc8a256a323c671173ef042a2d4229e24fc9679b3692d58c18c1e5cb6c39184f88ac4f1288ee899310be6bdd5424f01dea17a00066a4
6
+ metadata.gz: 18b4ccf55b2172573e6bebc55ac991209aa773ff29d5338d504f031c4d7df699ea85632b3a865add2da42286a724a8ec44ee34e0a1a81f9041f504b311490f87
7
+ data.tar.gz: a79d9431d74b22eb7e685143243e26553b48982716158bb5ca6b800e2364f5fa06c79cacec8e9457e1adc7e30555b7d709fa449ce4b8796e6f4a67afb2cfb33c
@@ -397,7 +397,7 @@ module Keycloak
397
397
  generic_get("users/#{id}/role-mappings/clients/#{client}", nil, access_token)
398
398
  end
399
399
 
400
- def self.update_effective_user_roles(id, client_id, rolesNames, access_token = nil)
400
+ def self.update_effective_user_roles(id, client_id, roles_names, access_token = nil)
401
401
  client = JSON get_clients({ clientId: client_id })
402
402
 
403
403
  user_roles = JSON get_client_level_role_for_user_and_app(id, client[0]['id'], access_token)
@@ -571,6 +571,19 @@ module Keycloak
571
571
  default_call(proc)
572
572
  end
573
573
 
574
+ def self.exists_name_or_email(value, user_id = '')
575
+ begin
576
+ usuario = Keycloak::Internal.get_user_info(value, true)
577
+ if user_id.empty? || user_id != usuario['id']
578
+ usuario.present?
579
+ else
580
+ false
581
+ end
582
+ rescue StandardError
583
+ false
584
+ end
585
+ end
586
+
574
587
  def self.logged_federation_user?
575
588
  info = get_logged_user_info
576
589
  info['federationLink'] != nil
@@ -1,3 +1,3 @@
1
1
  module Keycloak
2
- VERSION = "2.2.2"
2
+ VERSION = "2.2.3"
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.2.2
4
+ version: 2.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Guilherme Portugues
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-09-05 00:00:00.000000000 Z
11
+ date: 2017-09-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler