relay_api_client 0.0.3 → 0.1.0

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
- SHA1:
3
- metadata.gz: b4021e9cf5110be50d90340cdf10a37537c17c6b
4
- data.tar.gz: ad30db59106af084b832516910d64c2063f68ca8
2
+ SHA256:
3
+ metadata.gz: fc3559368f02e276bb91d00d8d446f4bc3187d981c935018dbfc4dfc3025e563
4
+ data.tar.gz: e77269bf19bf845efbb3911bb9cf8d5798ac0a5fe99f28cb782ad3a3994442ae
5
5
  SHA512:
6
- metadata.gz: 82a7e593508f5fb10404d21df533d0680d2dad32510fb35e1d89663fe4be2683985a2524b60ba1bb7b977ecb4adeaeb118b98b11cae680ca97d4408dfc7cbbc2
7
- data.tar.gz: 1dd34ed62729e93eadb6f8ac845e23324140bb19bfda8f0d1abf763db3a736584f40ab040a45c895229a9d58f6aa0ea44bead03d56ca79534ec087a1a7fa7ece
6
+ metadata.gz: 537fb29b33f259b33558488ec4ec5308080e31cdcfcd614dbce536dd824b5da6c61879f15fc153044c1b3587451732e61a79097120a483b85f939bcfc641d65c
7
+ data.tar.gz: f7aac5e476ff985ac912797f8aef353ba5edc76f72f0d71a6c4d886ee7b01eb3333751f76524f2f0647ca8d2c6c14908a885a547badc3f2493945c6df6d5817a
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # RelayApiClient
2
2
 
3
- TODO: Write a gem description
3
+ Note that the global_registry gem is required. In order to create Key/Relay accounts, your app's GR API system either needs to be root or trusted by the_key
4
4
 
5
5
  ## Installation
6
6
 
@@ -31,11 +31,13 @@ module RelayApiClient
31
31
  rescue => e
32
32
  if e.message.include?("user already exists")
33
33
  # check identity linking
34
- if RelayApiClient.linker_username &&
35
- RelayApiClient.linker_password &&
36
- l = IdentityLinker::Linker.find_linked_identity('relay_username', username, 'ssoguid')
37
- return l[:identity][:id_value]
38
- end
34
+ person_entity = GlobalRegistry::Entity.get(
35
+ 'entity_type' => 'person',
36
+ 'filters[key_username]' => username,
37
+ 'filters[owned_by]' => 'the_key'
38
+ )
39
+ guid = person_entity&.dig('entities', 0, 'person', 'authentication', 'key_guid')
40
+ return guid
39
41
  else
40
42
  raise
41
43
  end
@@ -57,6 +59,9 @@ module RelayApiClient
57
59
  response = client.call(:set_role, message: args)
58
60
 
59
61
  response.success?
62
+ rescue Savon::SOAPFault => e
63
+ return true if e.message.include?('duplicate')
64
+ false
60
65
  end
61
66
  end
62
67
  end
@@ -1,3 +1,3 @@
1
1
  module RelayApiClient
2
- VERSION = "0.0.3"
2
+ VERSION = "0.1.0"
3
3
  end
@@ -9,13 +9,6 @@ module RelayApiClient
9
9
  yield self
10
10
 
11
11
  self.wsdl ||= 'https://signin.cru.org/sso/selfservice/webservice/5.0?wsdl'
12
-
13
- if linker_username && linker_password
14
- IdentityLinker.configure do |c|
15
- c.server_id = linker_username
16
- c.server_secret = linker_password
17
- end
18
- end
19
12
  end
20
13
  end
21
14
  end
@@ -19,7 +19,7 @@ Gem::Specification.new do |spec|
19
19
  spec.require_paths = ["lib"]
20
20
 
21
21
  spec.add_dependency 'savon', '~> 2.1.0'
22
- spec.add_dependency 'identity_linker', '~> 1.0.0'
22
+ spec.add_dependency 'global_registry', '~> 1.5'
23
23
 
24
24
  spec.add_development_dependency "bundler", "~> 1.3"
25
25
  spec.add_development_dependency "rake"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: relay_api_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josh Starcher
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-12-27 00:00:00.000000000 Z
11
+ date: 2019-12-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: savon
@@ -25,19 +25,19 @@ dependencies:
25
25
  - !ruby/object:Gem::Version
26
26
  version: 2.1.0
27
27
  - !ruby/object:Gem::Dependency
28
- name: identity_linker
28
+ name: global_registry
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 1.0.0
33
+ version: '1.5'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 1.0.0
40
+ version: '1.5'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: bundler
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -101,8 +101,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
101
101
  - !ruby/object:Gem::Version
102
102
  version: '0'
103
103
  requirements: []
104
- rubyforge_project:
105
- rubygems_version: 2.4.2
104
+ rubygems_version: 3.0.6
106
105
  signing_key:
107
106
  specification_version: 4
108
107
  summary: Client for the Relay API