ssoready 0.1.0 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/requests.rb +28 -24
- data/lib/ssoready/management/organizations/client.rb +78 -16
- data/lib/ssoready/management/saml_connections/client.rb +78 -16
- data/lib/ssoready/management/scim_directories/client.rb +102 -20
- data/lib/ssoready/management/setup_urls/client.rb +18 -4
- data/lib/ssoready/saml/client.rb +36 -8
- data/lib/ssoready/scim/client.rb +84 -16
- data/lib/ssoready/types/create_setup_url_response.rb +2 -1
- data/lib/ssoready/types/get_saml_redirect_url_response.rb +2 -1
- data/lib/ssoready/types/google_protobuf_any.rb +2 -1
- data/lib/ssoready/types/list_organizations_response.rb +4 -4
- data/lib/ssoready/types/list_saml_connections_response.rb +4 -4
- data/lib/ssoready/types/list_scim_directories_response.rb +4 -4
- data/lib/ssoready/types/list_scim_groups_response.rb +4 -4
- data/lib/ssoready/types/list_scim_users_response.rb +4 -4
- data/lib/ssoready/types/organization.rb +6 -5
- data/lib/ssoready/types/redeem_saml_access_code_response.rb +7 -6
- data/lib/ssoready/types/rotate_scim_directory_bearer_token_response.rb +2 -1
- data/lib/ssoready/types/saml_connection.rb +9 -8
- data/lib/ssoready/types/scim_directory.rb +6 -5
- data/lib/ssoready/types/scim_group.rb +6 -5
- data/lib/ssoready/types/scim_user.rb +6 -5
- data/lib/ssoready/types/status.rb +5 -5
- data/lib/ssoready.rb +8 -8
- metadata +2 -2
@@ -29,8 +29,8 @@ module SSOReady
|
|
29
29
|
# @return [SSOReady::ListSCIMDirectoriesResponse]
|
30
30
|
# @example
|
31
31
|
# api = SSOReady::Client.new(
|
32
|
-
# environment: SSOReady::Environment::DEFAULT,
|
33
32
|
# base_url: "https://api.example.com",
|
33
|
+
# environment: SSOReady::Environment::DEFAULT,
|
34
34
|
# api_key: "YOUR_AUTH_TOKEN"
|
35
35
|
# )
|
36
36
|
# api.management.scim_directories.list_scim_directories
|
@@ -38,12 +38,19 @@ module SSOReady
|
|
38
38
|
response = @request_client.conn.get do |req|
|
39
39
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
40
40
|
req.headers["Authorization"] = request_options.api_key unless request_options&.api_key.nil?
|
41
|
-
req.headers = {
|
41
|
+
req.headers = {
|
42
|
+
**(req.headers || {}),
|
43
|
+
**@request_client.get_headers,
|
44
|
+
**(request_options&.additional_headers || {})
|
45
|
+
}.compact
|
42
46
|
req.params = {
|
43
47
|
**(request_options&.additional_query_parameters || {}),
|
44
48
|
"organizationId": organization_id,
|
45
49
|
"pageToken": page_token
|
46
50
|
}.compact
|
51
|
+
unless request_options.nil? || request_options&.additional_body_parameters.nil?
|
52
|
+
req.body = { **(request_options&.additional_body_parameters || {}) }.compact
|
53
|
+
end
|
47
54
|
req.url "#{@request_client.get_url(request_options: request_options)}/v1/scim-directories"
|
48
55
|
end
|
49
56
|
SSOReady::ListSCIMDirectoriesResponse.from_json(json_object: response.body)
|
@@ -61,8 +68,8 @@ module SSOReady
|
|
61
68
|
# @return [SSOReady::CreateSCIMDirectoryResponse]
|
62
69
|
# @example
|
63
70
|
# api = SSOReady::Client.new(
|
64
|
-
# environment: SSOReady::Environment::DEFAULT,
|
65
71
|
# base_url: "https://api.example.com",
|
72
|
+
# environment: SSOReady::Environment::DEFAULT,
|
66
73
|
# api_key: "YOUR_AUTH_TOKEN"
|
67
74
|
# )
|
68
75
|
# api.management.scim_directories.create_scim_directory(request: { })
|
@@ -70,7 +77,14 @@ module SSOReady
|
|
70
77
|
response = @request_client.conn.post do |req|
|
71
78
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
72
79
|
req.headers["Authorization"] = request_options.api_key unless request_options&.api_key.nil?
|
73
|
-
req.headers = {
|
80
|
+
req.headers = {
|
81
|
+
**(req.headers || {}),
|
82
|
+
**@request_client.get_headers,
|
83
|
+
**(request_options&.additional_headers || {})
|
84
|
+
}.compact
|
85
|
+
unless request_options.nil? || request_options&.additional_query_parameters.nil?
|
86
|
+
req.params = { **(request_options&.additional_query_parameters || {}) }.compact
|
87
|
+
end
|
74
88
|
req.body = { **(request || {}), **(request_options&.additional_body_parameters || {}) }.compact
|
75
89
|
req.url "#{@request_client.get_url(request_options: request_options)}/v1/scim-directories"
|
76
90
|
end
|
@@ -84,8 +98,8 @@ module SSOReady
|
|
84
98
|
# @return [SSOReady::GetSCIMDirectoryResponse]
|
85
99
|
# @example
|
86
100
|
# api = SSOReady::Client.new(
|
87
|
-
# environment: SSOReady::Environment::DEFAULT,
|
88
101
|
# base_url: "https://api.example.com",
|
102
|
+
# environment: SSOReady::Environment::DEFAULT,
|
89
103
|
# api_key: "YOUR_AUTH_TOKEN"
|
90
104
|
# )
|
91
105
|
# api.management.scim_directories.get_scim_directory(id: "id")
|
@@ -93,7 +107,17 @@ module SSOReady
|
|
93
107
|
response = @request_client.conn.get do |req|
|
94
108
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
95
109
|
req.headers["Authorization"] = request_options.api_key unless request_options&.api_key.nil?
|
96
|
-
req.headers = {
|
110
|
+
req.headers = {
|
111
|
+
**(req.headers || {}),
|
112
|
+
**@request_client.get_headers,
|
113
|
+
**(request_options&.additional_headers || {})
|
114
|
+
}.compact
|
115
|
+
unless request_options.nil? || request_options&.additional_query_parameters.nil?
|
116
|
+
req.params = { **(request_options&.additional_query_parameters || {}) }.compact
|
117
|
+
end
|
118
|
+
unless request_options.nil? || request_options&.additional_body_parameters.nil?
|
119
|
+
req.body = { **(request_options&.additional_body_parameters || {}) }.compact
|
120
|
+
end
|
97
121
|
req.url "#{@request_client.get_url(request_options: request_options)}/v1/scim-directories/#{id}"
|
98
122
|
end
|
99
123
|
SSOReady::GetSCIMDirectoryResponse.from_json(json_object: response.body)
|
@@ -112,8 +136,8 @@ module SSOReady
|
|
112
136
|
# @return [SSOReady::UpdateSCIMDirectoryResponse]
|
113
137
|
# @example
|
114
138
|
# api = SSOReady::Client.new(
|
115
|
-
# environment: SSOReady::Environment::DEFAULT,
|
116
139
|
# base_url: "https://api.example.com",
|
140
|
+
# environment: SSOReady::Environment::DEFAULT,
|
117
141
|
# api_key: "YOUR_AUTH_TOKEN"
|
118
142
|
# )
|
119
143
|
# api.management.scim_directories.update_scim_directory(id: "id", request: { })
|
@@ -121,7 +145,14 @@ module SSOReady
|
|
121
145
|
response = @request_client.conn.patch do |req|
|
122
146
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
123
147
|
req.headers["Authorization"] = request_options.api_key unless request_options&.api_key.nil?
|
124
|
-
req.headers = {
|
148
|
+
req.headers = {
|
149
|
+
**(req.headers || {}),
|
150
|
+
**@request_client.get_headers,
|
151
|
+
**(request_options&.additional_headers || {})
|
152
|
+
}.compact
|
153
|
+
unless request_options.nil? || request_options&.additional_query_parameters.nil?
|
154
|
+
req.params = { **(request_options&.additional_query_parameters || {}) }.compact
|
155
|
+
end
|
125
156
|
req.body = { **(request || {}), **(request_options&.additional_body_parameters || {}) }.compact
|
126
157
|
req.url "#{@request_client.get_url(request_options: request_options)}/v1/scim-directories/#{id}"
|
127
158
|
end
|
@@ -148,8 +179,8 @@ module SSOReady
|
|
148
179
|
# @return [SSOReady::RotateSCIMDirectoryBearerTokenResponse]
|
149
180
|
# @example
|
150
181
|
# api = SSOReady::Client.new(
|
151
|
-
# environment: SSOReady::Environment::DEFAULT,
|
152
182
|
# base_url: "https://api.example.com",
|
183
|
+
# environment: SSOReady::Environment::DEFAULT,
|
153
184
|
# api_key: "YOUR_AUTH_TOKEN"
|
154
185
|
# )
|
155
186
|
# api.management.scim_directories.rotate_scim_directory_bearer_token(id: "id")
|
@@ -157,7 +188,17 @@ module SSOReady
|
|
157
188
|
response = @request_client.conn.post do |req|
|
158
189
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
159
190
|
req.headers["Authorization"] = request_options.api_key unless request_options&.api_key.nil?
|
160
|
-
req.headers = {
|
191
|
+
req.headers = {
|
192
|
+
**(req.headers || {}),
|
193
|
+
**@request_client.get_headers,
|
194
|
+
**(request_options&.additional_headers || {})
|
195
|
+
}.compact
|
196
|
+
unless request_options.nil? || request_options&.additional_query_parameters.nil?
|
197
|
+
req.params = { **(request_options&.additional_query_parameters || {}) }.compact
|
198
|
+
end
|
199
|
+
unless request_options.nil? || request_options&.additional_body_parameters.nil?
|
200
|
+
req.body = { **(request_options&.additional_body_parameters || {}) }.compact
|
201
|
+
end
|
161
202
|
req.url "#{@request_client.get_url(request_options: request_options)}/v1/scim-directories/#{id}/rotate-bearer-token"
|
162
203
|
end
|
163
204
|
SSOReady::RotateSCIMDirectoryBearerTokenResponse.from_json(json_object: response.body)
|
@@ -182,8 +223,8 @@ module SSOReady
|
|
182
223
|
# @return [SSOReady::ListSCIMDirectoriesResponse]
|
183
224
|
# @example
|
184
225
|
# api = SSOReady::Client.new(
|
185
|
-
# environment: SSOReady::Environment::DEFAULT,
|
186
226
|
# base_url: "https://api.example.com",
|
227
|
+
# environment: SSOReady::Environment::DEFAULT,
|
187
228
|
# api_key: "YOUR_AUTH_TOKEN"
|
188
229
|
# )
|
189
230
|
# api.management.scim_directories.list_scim_directories
|
@@ -192,12 +233,19 @@ module SSOReady
|
|
192
233
|
response = @request_client.conn.get do |req|
|
193
234
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
194
235
|
req.headers["Authorization"] = request_options.api_key unless request_options&.api_key.nil?
|
195
|
-
req.headers = {
|
236
|
+
req.headers = {
|
237
|
+
**(req.headers || {}),
|
238
|
+
**@request_client.get_headers,
|
239
|
+
**(request_options&.additional_headers || {})
|
240
|
+
}.compact
|
196
241
|
req.params = {
|
197
242
|
**(request_options&.additional_query_parameters || {}),
|
198
243
|
"organizationId": organization_id,
|
199
244
|
"pageToken": page_token
|
200
245
|
}.compact
|
246
|
+
unless request_options.nil? || request_options&.additional_body_parameters.nil?
|
247
|
+
req.body = { **(request_options&.additional_body_parameters || {}) }.compact
|
248
|
+
end
|
201
249
|
req.url "#{@request_client.get_url(request_options: request_options)}/v1/scim-directories"
|
202
250
|
end
|
203
251
|
SSOReady::ListSCIMDirectoriesResponse.from_json(json_object: response.body)
|
@@ -216,8 +264,8 @@ module SSOReady
|
|
216
264
|
# @return [SSOReady::CreateSCIMDirectoryResponse]
|
217
265
|
# @example
|
218
266
|
# api = SSOReady::Client.new(
|
219
|
-
# environment: SSOReady::Environment::DEFAULT,
|
220
267
|
# base_url: "https://api.example.com",
|
268
|
+
# environment: SSOReady::Environment::DEFAULT,
|
221
269
|
# api_key: "YOUR_AUTH_TOKEN"
|
222
270
|
# )
|
223
271
|
# api.management.scim_directories.create_scim_directory(request: { })
|
@@ -226,7 +274,14 @@ module SSOReady
|
|
226
274
|
response = @request_client.conn.post do |req|
|
227
275
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
228
276
|
req.headers["Authorization"] = request_options.api_key unless request_options&.api_key.nil?
|
229
|
-
req.headers = {
|
277
|
+
req.headers = {
|
278
|
+
**(req.headers || {}),
|
279
|
+
**@request_client.get_headers,
|
280
|
+
**(request_options&.additional_headers || {})
|
281
|
+
}.compact
|
282
|
+
unless request_options.nil? || request_options&.additional_query_parameters.nil?
|
283
|
+
req.params = { **(request_options&.additional_query_parameters || {}) }.compact
|
284
|
+
end
|
230
285
|
req.body = { **(request || {}), **(request_options&.additional_body_parameters || {}) }.compact
|
231
286
|
req.url "#{@request_client.get_url(request_options: request_options)}/v1/scim-directories"
|
232
287
|
end
|
@@ -241,8 +296,8 @@ module SSOReady
|
|
241
296
|
# @return [SSOReady::GetSCIMDirectoryResponse]
|
242
297
|
# @example
|
243
298
|
# api = SSOReady::Client.new(
|
244
|
-
# environment: SSOReady::Environment::DEFAULT,
|
245
299
|
# base_url: "https://api.example.com",
|
300
|
+
# environment: SSOReady::Environment::DEFAULT,
|
246
301
|
# api_key: "YOUR_AUTH_TOKEN"
|
247
302
|
# )
|
248
303
|
# api.management.scim_directories.get_scim_directory(id: "id")
|
@@ -251,7 +306,17 @@ module SSOReady
|
|
251
306
|
response = @request_client.conn.get do |req|
|
252
307
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
253
308
|
req.headers["Authorization"] = request_options.api_key unless request_options&.api_key.nil?
|
254
|
-
req.headers = {
|
309
|
+
req.headers = {
|
310
|
+
**(req.headers || {}),
|
311
|
+
**@request_client.get_headers,
|
312
|
+
**(request_options&.additional_headers || {})
|
313
|
+
}.compact
|
314
|
+
unless request_options.nil? || request_options&.additional_query_parameters.nil?
|
315
|
+
req.params = { **(request_options&.additional_query_parameters || {}) }.compact
|
316
|
+
end
|
317
|
+
unless request_options.nil? || request_options&.additional_body_parameters.nil?
|
318
|
+
req.body = { **(request_options&.additional_body_parameters || {}) }.compact
|
319
|
+
end
|
255
320
|
req.url "#{@request_client.get_url(request_options: request_options)}/v1/scim-directories/#{id}"
|
256
321
|
end
|
257
322
|
SSOReady::GetSCIMDirectoryResponse.from_json(json_object: response.body)
|
@@ -271,8 +336,8 @@ module SSOReady
|
|
271
336
|
# @return [SSOReady::UpdateSCIMDirectoryResponse]
|
272
337
|
# @example
|
273
338
|
# api = SSOReady::Client.new(
|
274
|
-
# environment: SSOReady::Environment::DEFAULT,
|
275
339
|
# base_url: "https://api.example.com",
|
340
|
+
# environment: SSOReady::Environment::DEFAULT,
|
276
341
|
# api_key: "YOUR_AUTH_TOKEN"
|
277
342
|
# )
|
278
343
|
# api.management.scim_directories.update_scim_directory(id: "id", request: { })
|
@@ -281,7 +346,14 @@ module SSOReady
|
|
281
346
|
response = @request_client.conn.patch do |req|
|
282
347
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
283
348
|
req.headers["Authorization"] = request_options.api_key unless request_options&.api_key.nil?
|
284
|
-
req.headers = {
|
349
|
+
req.headers = {
|
350
|
+
**(req.headers || {}),
|
351
|
+
**@request_client.get_headers,
|
352
|
+
**(request_options&.additional_headers || {})
|
353
|
+
}.compact
|
354
|
+
unless request_options.nil? || request_options&.additional_query_parameters.nil?
|
355
|
+
req.params = { **(request_options&.additional_query_parameters || {}) }.compact
|
356
|
+
end
|
285
357
|
req.body = { **(request || {}), **(request_options&.additional_body_parameters || {}) }.compact
|
286
358
|
req.url "#{@request_client.get_url(request_options: request_options)}/v1/scim-directories/#{id}"
|
287
359
|
end
|
@@ -309,8 +381,8 @@ module SSOReady
|
|
309
381
|
# @return [SSOReady::RotateSCIMDirectoryBearerTokenResponse]
|
310
382
|
# @example
|
311
383
|
# api = SSOReady::Client.new(
|
312
|
-
# environment: SSOReady::Environment::DEFAULT,
|
313
384
|
# base_url: "https://api.example.com",
|
385
|
+
# environment: SSOReady::Environment::DEFAULT,
|
314
386
|
# api_key: "YOUR_AUTH_TOKEN"
|
315
387
|
# )
|
316
388
|
# api.management.scim_directories.rotate_scim_directory_bearer_token(id: "id")
|
@@ -319,7 +391,17 @@ module SSOReady
|
|
319
391
|
response = @request_client.conn.post do |req|
|
320
392
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
321
393
|
req.headers["Authorization"] = request_options.api_key unless request_options&.api_key.nil?
|
322
|
-
req.headers = {
|
394
|
+
req.headers = {
|
395
|
+
**(req.headers || {}),
|
396
|
+
**@request_client.get_headers,
|
397
|
+
**(request_options&.additional_headers || {})
|
398
|
+
}.compact
|
399
|
+
unless request_options.nil? || request_options&.additional_query_parameters.nil?
|
400
|
+
req.params = { **(request_options&.additional_query_parameters || {}) }.compact
|
401
|
+
end
|
402
|
+
unless request_options.nil? || request_options&.additional_body_parameters.nil?
|
403
|
+
req.body = { **(request_options&.additional_body_parameters || {}) }.compact
|
404
|
+
end
|
323
405
|
req.url "#{@request_client.get_url(request_options: request_options)}/v1/scim-directories/#{id}/rotate-bearer-token"
|
324
406
|
end
|
325
407
|
SSOReady::RotateSCIMDirectoryBearerTokenResponse.from_json(json_object: response.body)
|
@@ -27,8 +27,8 @@ module SSOReady
|
|
27
27
|
# @return [SSOReady::CreateSetupURLResponse]
|
28
28
|
# @example
|
29
29
|
# api = SSOReady::Client.new(
|
30
|
-
# environment: SSOReady::Environment::DEFAULT,
|
31
30
|
# base_url: "https://api.example.com",
|
31
|
+
# environment: SSOReady::Environment::DEFAULT,
|
32
32
|
# api_key: "YOUR_AUTH_TOKEN"
|
33
33
|
# )
|
34
34
|
# api.management.setup_urls.create_setup_url
|
@@ -36,7 +36,14 @@ module SSOReady
|
|
36
36
|
response = @request_client.conn.post do |req|
|
37
37
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
38
38
|
req.headers["Authorization"] = request_options.api_key unless request_options&.api_key.nil?
|
39
|
-
req.headers = {
|
39
|
+
req.headers = {
|
40
|
+
**(req.headers || {}),
|
41
|
+
**@request_client.get_headers,
|
42
|
+
**(request_options&.additional_headers || {})
|
43
|
+
}.compact
|
44
|
+
unless request_options.nil? || request_options&.additional_query_parameters.nil?
|
45
|
+
req.params = { **(request_options&.additional_query_parameters || {}) }.compact
|
46
|
+
end
|
40
47
|
req.body = {
|
41
48
|
**(request_options&.additional_body_parameters || {}),
|
42
49
|
organizationId: organization_id,
|
@@ -70,8 +77,8 @@ module SSOReady
|
|
70
77
|
# @return [SSOReady::CreateSetupURLResponse]
|
71
78
|
# @example
|
72
79
|
# api = SSOReady::Client.new(
|
73
|
-
# environment: SSOReady::Environment::DEFAULT,
|
74
80
|
# base_url: "https://api.example.com",
|
81
|
+
# environment: SSOReady::Environment::DEFAULT,
|
75
82
|
# api_key: "YOUR_AUTH_TOKEN"
|
76
83
|
# )
|
77
84
|
# api.management.setup_urls.create_setup_url
|
@@ -80,7 +87,14 @@ module SSOReady
|
|
80
87
|
response = @request_client.conn.post do |req|
|
81
88
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
82
89
|
req.headers["Authorization"] = request_options.api_key unless request_options&.api_key.nil?
|
83
|
-
req.headers = {
|
90
|
+
req.headers = {
|
91
|
+
**(req.headers || {}),
|
92
|
+
**@request_client.get_headers,
|
93
|
+
**(request_options&.additional_headers || {})
|
94
|
+
}.compact
|
95
|
+
unless request_options.nil? || request_options&.additional_query_parameters.nil?
|
96
|
+
req.params = { **(request_options&.additional_query_parameters || {}) }.compact
|
97
|
+
end
|
84
98
|
req.body = {
|
85
99
|
**(request_options&.additional_body_parameters || {}),
|
86
100
|
organizationId: organization_id,
|
data/lib/ssoready/saml/client.rb
CHANGED
@@ -23,8 +23,8 @@ module SSOReady
|
|
23
23
|
# @return [SSOReady::RedeemSAMLAccessCodeResponse]
|
24
24
|
# @example
|
25
25
|
# api = SSOReady::Client.new(
|
26
|
-
# environment: SSOReady::Environment::DEFAULT,
|
27
26
|
# base_url: "https://api.example.com",
|
27
|
+
# environment: SSOReady::Environment::DEFAULT,
|
28
28
|
# api_key: "YOUR_AUTH_TOKEN"
|
29
29
|
# )
|
30
30
|
# api.saml.redeem_saml_access_code(saml_access_code: "saml_access_code_...")
|
@@ -32,7 +32,14 @@ module SSOReady
|
|
32
32
|
response = @request_client.conn.post do |req|
|
33
33
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
34
34
|
req.headers["Authorization"] = request_options.api_key unless request_options&.api_key.nil?
|
35
|
-
req.headers = {
|
35
|
+
req.headers = {
|
36
|
+
**(req.headers || {}),
|
37
|
+
**@request_client.get_headers,
|
38
|
+
**(request_options&.additional_headers || {})
|
39
|
+
}.compact
|
40
|
+
unless request_options.nil? || request_options&.additional_query_parameters.nil?
|
41
|
+
req.params = { **(request_options&.additional_query_parameters || {}) }.compact
|
42
|
+
end
|
36
43
|
req.body = { **(request_options&.additional_body_parameters || {}), samlAccessCode: saml_access_code }.compact
|
37
44
|
req.url "#{@request_client.get_url(request_options: request_options)}/v1/saml/redeem"
|
38
45
|
end
|
@@ -61,8 +68,8 @@ module SSOReady
|
|
61
68
|
# @return [SSOReady::GetSAMLRedirectURLResponse]
|
62
69
|
# @example
|
63
70
|
# api = SSOReady::Client.new(
|
64
|
-
# environment: SSOReady::Environment::DEFAULT,
|
65
71
|
# base_url: "https://api.example.com",
|
72
|
+
# environment: SSOReady::Environment::DEFAULT,
|
66
73
|
# api_key: "YOUR_AUTH_TOKEN"
|
67
74
|
# )
|
68
75
|
# api.saml.get_saml_redirect_url(organization_external_id: "my_custom_external_id")
|
@@ -71,7 +78,14 @@ module SSOReady
|
|
71
78
|
response = @request_client.conn.post do |req|
|
72
79
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
73
80
|
req.headers["Authorization"] = request_options.api_key unless request_options&.api_key.nil?
|
74
|
-
req.headers = {
|
81
|
+
req.headers = {
|
82
|
+
**(req.headers || {}),
|
83
|
+
**@request_client.get_headers,
|
84
|
+
**(request_options&.additional_headers || {})
|
85
|
+
}.compact
|
86
|
+
unless request_options.nil? || request_options&.additional_query_parameters.nil?
|
87
|
+
req.params = { **(request_options&.additional_query_parameters || {}) }.compact
|
88
|
+
end
|
75
89
|
req.body = {
|
76
90
|
**(request_options&.additional_body_parameters || {}),
|
77
91
|
samlConnectionId: saml_connection_id,
|
@@ -102,8 +116,8 @@ module SSOReady
|
|
102
116
|
# @return [SSOReady::RedeemSAMLAccessCodeResponse]
|
103
117
|
# @example
|
104
118
|
# api = SSOReady::Client.new(
|
105
|
-
# environment: SSOReady::Environment::DEFAULT,
|
106
119
|
# base_url: "https://api.example.com",
|
120
|
+
# environment: SSOReady::Environment::DEFAULT,
|
107
121
|
# api_key: "YOUR_AUTH_TOKEN"
|
108
122
|
# )
|
109
123
|
# api.saml.redeem_saml_access_code(saml_access_code: "saml_access_code_...")
|
@@ -112,7 +126,14 @@ module SSOReady
|
|
112
126
|
response = @request_client.conn.post do |req|
|
113
127
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
114
128
|
req.headers["Authorization"] = request_options.api_key unless request_options&.api_key.nil?
|
115
|
-
req.headers = {
|
129
|
+
req.headers = {
|
130
|
+
**(req.headers || {}),
|
131
|
+
**@request_client.get_headers,
|
132
|
+
**(request_options&.additional_headers || {})
|
133
|
+
}.compact
|
134
|
+
unless request_options.nil? || request_options&.additional_query_parameters.nil?
|
135
|
+
req.params = { **(request_options&.additional_query_parameters || {}) }.compact
|
136
|
+
end
|
116
137
|
req.body = { **(request_options&.additional_body_parameters || {}), samlAccessCode: saml_access_code }.compact
|
117
138
|
req.url "#{@request_client.get_url(request_options: request_options)}/v1/saml/redeem"
|
118
139
|
end
|
@@ -142,8 +163,8 @@ module SSOReady
|
|
142
163
|
# @return [SSOReady::GetSAMLRedirectURLResponse]
|
143
164
|
# @example
|
144
165
|
# api = SSOReady::Client.new(
|
145
|
-
# environment: SSOReady::Environment::DEFAULT,
|
146
166
|
# base_url: "https://api.example.com",
|
167
|
+
# environment: SSOReady::Environment::DEFAULT,
|
147
168
|
# api_key: "YOUR_AUTH_TOKEN"
|
148
169
|
# )
|
149
170
|
# api.saml.get_saml_redirect_url(organization_external_id: "my_custom_external_id")
|
@@ -153,7 +174,14 @@ module SSOReady
|
|
153
174
|
response = @request_client.conn.post do |req|
|
154
175
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
155
176
|
req.headers["Authorization"] = request_options.api_key unless request_options&.api_key.nil?
|
156
|
-
req.headers = {
|
177
|
+
req.headers = {
|
178
|
+
**(req.headers || {}),
|
179
|
+
**@request_client.get_headers,
|
180
|
+
**(request_options&.additional_headers || {})
|
181
|
+
}.compact
|
182
|
+
unless request_options.nil? || request_options&.additional_query_parameters.nil?
|
183
|
+
req.params = { **(request_options&.additional_query_parameters || {}) }.compact
|
184
|
+
end
|
157
185
|
req.body = {
|
158
186
|
**(request_options&.additional_body_parameters || {}),
|
159
187
|
samlConnectionId: saml_connection_id,
|
data/lib/ssoready/scim/client.rb
CHANGED
@@ -36,8 +36,8 @@ module SSOReady
|
|
36
36
|
# @return [SSOReady::ListSCIMGroupsResponse]
|
37
37
|
# @example
|
38
38
|
# api = SSOReady::Client.new(
|
39
|
-
# environment: SSOReady::Environment::DEFAULT,
|
40
39
|
# base_url: "https://api.example.com",
|
40
|
+
# environment: SSOReady::Environment::DEFAULT,
|
41
41
|
# api_key: "YOUR_AUTH_TOKEN"
|
42
42
|
# )
|
43
43
|
# api.scim.list_scim_groups(organization_external_id: "my_custom_external_id")
|
@@ -46,7 +46,11 @@ module SSOReady
|
|
46
46
|
response = @request_client.conn.get do |req|
|
47
47
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
48
48
|
req.headers["Authorization"] = request_options.api_key unless request_options&.api_key.nil?
|
49
|
-
req.headers = {
|
49
|
+
req.headers = {
|
50
|
+
**(req.headers || {}),
|
51
|
+
**@request_client.get_headers,
|
52
|
+
**(request_options&.additional_headers || {})
|
53
|
+
}.compact
|
50
54
|
req.params = {
|
51
55
|
**(request_options&.additional_query_parameters || {}),
|
52
56
|
"scimDirectoryId": scim_directory_id,
|
@@ -54,6 +58,9 @@ module SSOReady
|
|
54
58
|
"organizationExternalId": organization_external_id,
|
55
59
|
"pageToken": page_token
|
56
60
|
}.compact
|
61
|
+
unless request_options.nil? || request_options&.additional_body_parameters.nil?
|
62
|
+
req.body = { **(request_options&.additional_body_parameters || {}) }.compact
|
63
|
+
end
|
57
64
|
req.url "#{@request_client.get_url(request_options: request_options)}/v1/scim/groups"
|
58
65
|
end
|
59
66
|
SSOReady::ListSCIMGroupsResponse.from_json(json_object: response.body)
|
@@ -66,8 +73,8 @@ module SSOReady
|
|
66
73
|
# @return [SSOReady::GetSCIMGroupResponse]
|
67
74
|
# @example
|
68
75
|
# api = SSOReady::Client.new(
|
69
|
-
# environment: SSOReady::Environment::DEFAULT,
|
70
76
|
# base_url: "https://api.example.com",
|
77
|
+
# environment: SSOReady::Environment::DEFAULT,
|
71
78
|
# api_key: "YOUR_AUTH_TOKEN"
|
72
79
|
# )
|
73
80
|
# api.scim.get_scim_group(id: "scim_group_...")
|
@@ -75,7 +82,17 @@ module SSOReady
|
|
75
82
|
response = @request_client.conn.get do |req|
|
76
83
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
77
84
|
req.headers["Authorization"] = request_options.api_key unless request_options&.api_key.nil?
|
78
|
-
req.headers = {
|
85
|
+
req.headers = {
|
86
|
+
**(req.headers || {}),
|
87
|
+
**@request_client.get_headers,
|
88
|
+
**(request_options&.additional_headers || {})
|
89
|
+
}.compact
|
90
|
+
unless request_options.nil? || request_options&.additional_query_parameters.nil?
|
91
|
+
req.params = { **(request_options&.additional_query_parameters || {}) }.compact
|
92
|
+
end
|
93
|
+
unless request_options.nil? || request_options&.additional_body_parameters.nil?
|
94
|
+
req.body = { **(request_options&.additional_body_parameters || {}) }.compact
|
95
|
+
end
|
79
96
|
req.url "#{@request_client.get_url(request_options: request_options)}/v1/scim/groups/#{id}"
|
80
97
|
end
|
81
98
|
SSOReady::GetSCIMGroupResponse.from_json(json_object: response.body)
|
@@ -100,8 +117,8 @@ module SSOReady
|
|
100
117
|
# @return [SSOReady::ListSCIMUsersResponse]
|
101
118
|
# @example
|
102
119
|
# api = SSOReady::Client.new(
|
103
|
-
# environment: SSOReady::Environment::DEFAULT,
|
104
120
|
# base_url: "https://api.example.com",
|
121
|
+
# environment: SSOReady::Environment::DEFAULT,
|
105
122
|
# api_key: "YOUR_AUTH_TOKEN"
|
106
123
|
# )
|
107
124
|
# api.scim.list_scim_users(organization_external_id: "my_custom_external_id")
|
@@ -110,7 +127,11 @@ module SSOReady
|
|
110
127
|
response = @request_client.conn.get do |req|
|
111
128
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
112
129
|
req.headers["Authorization"] = request_options.api_key unless request_options&.api_key.nil?
|
113
|
-
req.headers = {
|
130
|
+
req.headers = {
|
131
|
+
**(req.headers || {}),
|
132
|
+
**@request_client.get_headers,
|
133
|
+
**(request_options&.additional_headers || {})
|
134
|
+
}.compact
|
114
135
|
req.params = {
|
115
136
|
**(request_options&.additional_query_parameters || {}),
|
116
137
|
"scimDirectoryId": scim_directory_id,
|
@@ -119,6 +140,9 @@ module SSOReady
|
|
119
140
|
"scimGroupId": scim_group_id,
|
120
141
|
"pageToken": page_token
|
121
142
|
}.compact
|
143
|
+
unless request_options.nil? || request_options&.additional_body_parameters.nil?
|
144
|
+
req.body = { **(request_options&.additional_body_parameters || {}) }.compact
|
145
|
+
end
|
122
146
|
req.url "#{@request_client.get_url(request_options: request_options)}/v1/scim/users"
|
123
147
|
end
|
124
148
|
SSOReady::ListSCIMUsersResponse.from_json(json_object: response.body)
|
@@ -131,8 +155,8 @@ module SSOReady
|
|
131
155
|
# @return [SSOReady::GetSCIMUserResponse]
|
132
156
|
# @example
|
133
157
|
# api = SSOReady::Client.new(
|
134
|
-
# environment: SSOReady::Environment::DEFAULT,
|
135
158
|
# base_url: "https://api.example.com",
|
159
|
+
# environment: SSOReady::Environment::DEFAULT,
|
136
160
|
# api_key: "YOUR_AUTH_TOKEN"
|
137
161
|
# )
|
138
162
|
# api.scim.get_scim_user(id: "scim_user_...")
|
@@ -140,7 +164,17 @@ module SSOReady
|
|
140
164
|
response = @request_client.conn.get do |req|
|
141
165
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
142
166
|
req.headers["Authorization"] = request_options.api_key unless request_options&.api_key.nil?
|
143
|
-
req.headers = {
|
167
|
+
req.headers = {
|
168
|
+
**(req.headers || {}),
|
169
|
+
**@request_client.get_headers,
|
170
|
+
**(request_options&.additional_headers || {})
|
171
|
+
}.compact
|
172
|
+
unless request_options.nil? || request_options&.additional_query_parameters.nil?
|
173
|
+
req.params = { **(request_options&.additional_query_parameters || {}) }.compact
|
174
|
+
end
|
175
|
+
unless request_options.nil? || request_options&.additional_body_parameters.nil?
|
176
|
+
req.body = { **(request_options&.additional_body_parameters || {}) }.compact
|
177
|
+
end
|
144
178
|
req.url "#{@request_client.get_url(request_options: request_options)}/v1/scim/users/#{id}"
|
145
179
|
end
|
146
180
|
SSOReady::GetSCIMUserResponse.from_json(json_object: response.body)
|
@@ -175,8 +209,8 @@ module SSOReady
|
|
175
209
|
# @return [SSOReady::ListSCIMGroupsResponse]
|
176
210
|
# @example
|
177
211
|
# api = SSOReady::Client.new(
|
178
|
-
# environment: SSOReady::Environment::DEFAULT,
|
179
212
|
# base_url: "https://api.example.com",
|
213
|
+
# environment: SSOReady::Environment::DEFAULT,
|
180
214
|
# api_key: "YOUR_AUTH_TOKEN"
|
181
215
|
# )
|
182
216
|
# api.scim.list_scim_groups(organization_external_id: "my_custom_external_id")
|
@@ -186,7 +220,11 @@ module SSOReady
|
|
186
220
|
response = @request_client.conn.get do |req|
|
187
221
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
188
222
|
req.headers["Authorization"] = request_options.api_key unless request_options&.api_key.nil?
|
189
|
-
req.headers = {
|
223
|
+
req.headers = {
|
224
|
+
**(req.headers || {}),
|
225
|
+
**@request_client.get_headers,
|
226
|
+
**(request_options&.additional_headers || {})
|
227
|
+
}.compact
|
190
228
|
req.params = {
|
191
229
|
**(request_options&.additional_query_parameters || {}),
|
192
230
|
"scimDirectoryId": scim_directory_id,
|
@@ -194,6 +232,9 @@ module SSOReady
|
|
194
232
|
"organizationExternalId": organization_external_id,
|
195
233
|
"pageToken": page_token
|
196
234
|
}.compact
|
235
|
+
unless request_options.nil? || request_options&.additional_body_parameters.nil?
|
236
|
+
req.body = { **(request_options&.additional_body_parameters || {}) }.compact
|
237
|
+
end
|
197
238
|
req.url "#{@request_client.get_url(request_options: request_options)}/v1/scim/groups"
|
198
239
|
end
|
199
240
|
SSOReady::ListSCIMGroupsResponse.from_json(json_object: response.body)
|
@@ -207,8 +248,8 @@ module SSOReady
|
|
207
248
|
# @return [SSOReady::GetSCIMGroupResponse]
|
208
249
|
# @example
|
209
250
|
# api = SSOReady::Client.new(
|
210
|
-
# environment: SSOReady::Environment::DEFAULT,
|
211
251
|
# base_url: "https://api.example.com",
|
252
|
+
# environment: SSOReady::Environment::DEFAULT,
|
212
253
|
# api_key: "YOUR_AUTH_TOKEN"
|
213
254
|
# )
|
214
255
|
# api.scim.get_scim_group(id: "scim_group_...")
|
@@ -217,7 +258,17 @@ module SSOReady
|
|
217
258
|
response = @request_client.conn.get do |req|
|
218
259
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
219
260
|
req.headers["Authorization"] = request_options.api_key unless request_options&.api_key.nil?
|
220
|
-
req.headers = {
|
261
|
+
req.headers = {
|
262
|
+
**(req.headers || {}),
|
263
|
+
**@request_client.get_headers,
|
264
|
+
**(request_options&.additional_headers || {})
|
265
|
+
}.compact
|
266
|
+
unless request_options.nil? || request_options&.additional_query_parameters.nil?
|
267
|
+
req.params = { **(request_options&.additional_query_parameters || {}) }.compact
|
268
|
+
end
|
269
|
+
unless request_options.nil? || request_options&.additional_body_parameters.nil?
|
270
|
+
req.body = { **(request_options&.additional_body_parameters || {}) }.compact
|
271
|
+
end
|
221
272
|
req.url "#{@request_client.get_url(request_options: request_options)}/v1/scim/groups/#{id}"
|
222
273
|
end
|
223
274
|
SSOReady::GetSCIMGroupResponse.from_json(json_object: response.body)
|
@@ -243,8 +294,8 @@ module SSOReady
|
|
243
294
|
# @return [SSOReady::ListSCIMUsersResponse]
|
244
295
|
# @example
|
245
296
|
# api = SSOReady::Client.new(
|
246
|
-
# environment: SSOReady::Environment::DEFAULT,
|
247
297
|
# base_url: "https://api.example.com",
|
298
|
+
# environment: SSOReady::Environment::DEFAULT,
|
248
299
|
# api_key: "YOUR_AUTH_TOKEN"
|
249
300
|
# )
|
250
301
|
# api.scim.list_scim_users(organization_external_id: "my_custom_external_id")
|
@@ -254,7 +305,11 @@ module SSOReady
|
|
254
305
|
response = @request_client.conn.get do |req|
|
255
306
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
256
307
|
req.headers["Authorization"] = request_options.api_key unless request_options&.api_key.nil?
|
257
|
-
req.headers = {
|
308
|
+
req.headers = {
|
309
|
+
**(req.headers || {}),
|
310
|
+
**@request_client.get_headers,
|
311
|
+
**(request_options&.additional_headers || {})
|
312
|
+
}.compact
|
258
313
|
req.params = {
|
259
314
|
**(request_options&.additional_query_parameters || {}),
|
260
315
|
"scimDirectoryId": scim_directory_id,
|
@@ -263,6 +318,9 @@ module SSOReady
|
|
263
318
|
"scimGroupId": scim_group_id,
|
264
319
|
"pageToken": page_token
|
265
320
|
}.compact
|
321
|
+
unless request_options.nil? || request_options&.additional_body_parameters.nil?
|
322
|
+
req.body = { **(request_options&.additional_body_parameters || {}) }.compact
|
323
|
+
end
|
266
324
|
req.url "#{@request_client.get_url(request_options: request_options)}/v1/scim/users"
|
267
325
|
end
|
268
326
|
SSOReady::ListSCIMUsersResponse.from_json(json_object: response.body)
|
@@ -276,8 +334,8 @@ module SSOReady
|
|
276
334
|
# @return [SSOReady::GetSCIMUserResponse]
|
277
335
|
# @example
|
278
336
|
# api = SSOReady::Client.new(
|
279
|
-
# environment: SSOReady::Environment::DEFAULT,
|
280
337
|
# base_url: "https://api.example.com",
|
338
|
+
# environment: SSOReady::Environment::DEFAULT,
|
281
339
|
# api_key: "YOUR_AUTH_TOKEN"
|
282
340
|
# )
|
283
341
|
# api.scim.get_scim_user(id: "scim_user_...")
|
@@ -286,7 +344,17 @@ module SSOReady
|
|
286
344
|
response = @request_client.conn.get do |req|
|
287
345
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
288
346
|
req.headers["Authorization"] = request_options.api_key unless request_options&.api_key.nil?
|
289
|
-
req.headers = {
|
347
|
+
req.headers = {
|
348
|
+
**(req.headers || {}),
|
349
|
+
**@request_client.get_headers,
|
350
|
+
**(request_options&.additional_headers || {})
|
351
|
+
}.compact
|
352
|
+
unless request_options.nil? || request_options&.additional_query_parameters.nil?
|
353
|
+
req.params = { **(request_options&.additional_query_parameters || {}) }.compact
|
354
|
+
end
|
355
|
+
unless request_options.nil? || request_options&.additional_body_parameters.nil?
|
356
|
+
req.body = { **(request_options&.additional_body_parameters || {}) }.compact
|
357
|
+
end
|
290
358
|
req.url "#{@request_client.get_url(request_options: request_options)}/v1/scim/users/#{id}"
|
291
359
|
end
|
292
360
|
SSOReady::GetSCIMUserResponse.from_json(json_object: response.body)
|