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 +5 -5
- data/README.md +1 -1
- data/lib/relay_api_client/base.rb +10 -5
- data/lib/relay_api_client/version.rb +1 -1
- data/lib/relay_api_client.rb +0 -7
- data/relay_api_client.gemspec +1 -1
- metadata +6 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: fc3559368f02e276bb91d00d8d446f4bc3187d981c935018dbfc4dfc3025e563
|
4
|
+
data.tar.gz: e77269bf19bf845efbb3911bb9cf8d5798ac0a5fe99f28cb782ad3a3994442ae
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 537fb29b33f259b33558488ec4ec5308080e31cdcfcd614dbce536dd824b5da6c61879f15fc153044c1b3587451732e61a79097120a483b85f939bcfc641d65c
|
7
|
+
data.tar.gz: f7aac5e476ff985ac912797f8aef353ba5edc76f72f0d71a6c4d886ee7b01eb3333751f76524f2f0647ca8d2c6c14908a885a547badc3f2493945c6df6d5817a
|
data/README.md
CHANGED
@@ -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
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
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
|
data/lib/relay_api_client.rb
CHANGED
@@ -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
|
data/relay_api_client.gemspec
CHANGED
@@ -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 '
|
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
|
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:
|
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:
|
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.
|
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.
|
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
|
-
|
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
|