fusionauth_client 1.11.0 → 1.12.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/build.savant +1 -1
- data/fusionauth_client.gemspec +1 -1
- data/lib/fusionauth/fusionauth_client.rb +1003 -620
- data/lib/fusionauth/rest_client.rb +43 -3
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: a8e45548586d094ba403e9176f6ee2148b2da6d689b626356811f4d6027b09d8
|
4
|
+
data.tar.gz: e7525b7fa0e267ab052485626dda018c4a010f80e2b6a536cef33512267735f6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dc78da9e2353c443647b9e09609052f4470e98ebaa527776562dcb10d28bce1ca9cf8085fc95afc67edab16e6c35f719489e10e621476dd38f1c0365afe075c1
|
7
|
+
data.tar.gz: 4143c112ae46fbb9fbbc790876b72d6c096a82d306e2938e43214ec5294ffd5fa77acea4ada58b19303506e5b3cf65374b4a8b9c8145ff447116e1fe2924ecea
|
data/build.savant
CHANGED
@@ -16,7 +16,7 @@
|
|
16
16
|
savantVersion = "1.0.0"
|
17
17
|
|
18
18
|
pubVersion = ""
|
19
|
-
project(group: "io.fusionauth", name: "fusionauth-ruby-client", version: "1.
|
19
|
+
project(group: "io.fusionauth", name: "fusionauth-ruby-client", version: "1.12.0", licenses: ["ApacheV2_0"]) {
|
20
20
|
workflow {
|
21
21
|
standard()
|
22
22
|
}
|
data/fusionauth_client.gemspec
CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = 'fusionauth_client'
|
7
|
-
spec.version = '1.
|
7
|
+
spec.version = '1.12.0'
|
8
8
|
spec.authors = ['Brian Pontarelli', 'Daniel DeGroff']
|
9
9
|
spec.email = %w(brian@fusionauth.io daniel@fusionauth.io)
|
10
10
|
|
@@ -27,13 +27,18 @@ module FusionAuth
|
|
27
27
|
#
|
28
28
|
# noinspection RubyInstanceMethodNamingConvention,RubyTooManyMethodsInspection,RubyParameterNamingConvention
|
29
29
|
class FusionAuthClient
|
30
|
-
attr_accessor :api_key, :base_url, :connect_timeout, :read_timeout
|
30
|
+
attr_accessor :api_key, :base_url, :connect_timeout, :read_timeout, :tenant_id
|
31
31
|
|
32
32
|
def initialize(api_key, base_url)
|
33
33
|
@api_key = api_key
|
34
34
|
@base_url = base_url
|
35
35
|
@connect_timeout = 1000
|
36
36
|
@read_timeout = 2000
|
37
|
+
@tenant_id = nil
|
38
|
+
end
|
39
|
+
|
40
|
+
def set_tenant_id(tenant_id)
|
41
|
+
@tenant_id = tenant_id
|
37
42
|
end
|
38
43
|
|
39
44
|
#
|
@@ -48,10 +53,10 @@ module FusionAuth
|
|
48
53
|
#
|
49
54
|
def action_user(actionee_user_id, request)
|
50
55
|
start.uri('/api/user/action')
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
56
|
+
.url_segment(actionee_user_id)
|
57
|
+
.body_handler(FusionAuth::JSONBodyHandler.new(request))
|
58
|
+
.post()
|
59
|
+
.go()
|
55
60
|
end
|
56
61
|
|
57
62
|
#
|
@@ -63,10 +68,10 @@ module FusionAuth
|
|
63
68
|
#
|
64
69
|
def add_user_to_family(family_id, request)
|
65
70
|
start.uri('/api/user/family')
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
71
|
+
.url_segment(family_id)
|
72
|
+
.body_handler(FusionAuth::JSONBodyHandler.new(request))
|
73
|
+
.put()
|
74
|
+
.go()
|
70
75
|
end
|
71
76
|
|
72
77
|
#
|
@@ -78,10 +83,10 @@ module FusionAuth
|
|
78
83
|
#
|
79
84
|
def cancel_action(action_id, request)
|
80
85
|
start.uri('/api/user/action')
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
86
|
+
.url_segment(action_id)
|
87
|
+
.body_handler(FusionAuth::JSONBodyHandler.new(request))
|
88
|
+
.delete()
|
89
|
+
.go()
|
85
90
|
end
|
86
91
|
|
87
92
|
#
|
@@ -93,11 +98,11 @@ module FusionAuth
|
|
93
98
|
# @return [FusionAuth::ClientResponse] The ClientResponse object.
|
94
99
|
#
|
95
100
|
def change_password(change_password_id, request)
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
+
startAnonymous.uri('/api/user/change-password')
|
102
|
+
.url_segment(change_password_id)
|
103
|
+
.body_handler(FusionAuth::JSONBodyHandler.new(request))
|
104
|
+
.post()
|
105
|
+
.go()
|
101
106
|
end
|
102
107
|
|
103
108
|
#
|
@@ -110,9 +115,9 @@ module FusionAuth
|
|
110
115
|
#
|
111
116
|
def change_password_by_identity(request)
|
112
117
|
start.uri('/api/user/change-password')
|
113
|
-
|
114
|
-
|
115
|
-
|
118
|
+
.body_handler(FusionAuth::JSONBodyHandler.new(request))
|
119
|
+
.post()
|
120
|
+
.go()
|
116
121
|
end
|
117
122
|
|
118
123
|
#
|
@@ -123,9 +128,9 @@ module FusionAuth
|
|
123
128
|
#
|
124
129
|
def comment_on_user(request)
|
125
130
|
start.uri('/api/user/comment')
|
126
|
-
|
127
|
-
|
128
|
-
|
131
|
+
.body_handler(FusionAuth::JSONBodyHandler.new(request))
|
132
|
+
.post()
|
133
|
+
.go()
|
129
134
|
end
|
130
135
|
|
131
136
|
#
|
@@ -137,10 +142,10 @@ module FusionAuth
|
|
137
142
|
#
|
138
143
|
def create_application(application_id, request)
|
139
144
|
start.uri('/api/application')
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
145
|
+
.url_segment(application_id)
|
146
|
+
.body_handler(FusionAuth::JSONBodyHandler.new(request))
|
147
|
+
.post()
|
148
|
+
.go()
|
144
149
|
end
|
145
150
|
|
146
151
|
#
|
@@ -154,12 +159,12 @@ module FusionAuth
|
|
154
159
|
#
|
155
160
|
def create_application_role(application_id, role_id, request)
|
156
161
|
start.uri('/api/application')
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
162
|
+
.url_segment(application_id)
|
163
|
+
.url_segment("role")
|
164
|
+
.url_segment(role_id)
|
165
|
+
.body_handler(FusionAuth::JSONBodyHandler.new(request))
|
166
|
+
.post()
|
167
|
+
.go()
|
163
168
|
end
|
164
169
|
|
165
170
|
#
|
@@ -172,9 +177,9 @@ module FusionAuth
|
|
172
177
|
#
|
173
178
|
def create_audit_log(request)
|
174
179
|
start.uri('/api/system/audit-log')
|
175
|
-
|
176
|
-
|
177
|
-
|
180
|
+
.body_handler(FusionAuth::JSONBodyHandler.new(request))
|
181
|
+
.post()
|
182
|
+
.go()
|
178
183
|
end
|
179
184
|
|
180
185
|
#
|
@@ -186,10 +191,10 @@ module FusionAuth
|
|
186
191
|
#
|
187
192
|
def create_consent(consent_id, request)
|
188
193
|
start.uri('/api/consent')
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
194
|
+
.url_segment(consent_id)
|
195
|
+
.body_handler(FusionAuth::JSONBodyHandler.new(request))
|
196
|
+
.post()
|
197
|
+
.go()
|
193
198
|
end
|
194
199
|
|
195
200
|
#
|
@@ -201,10 +206,10 @@ module FusionAuth
|
|
201
206
|
#
|
202
207
|
def create_email_template(email_template_id, request)
|
203
208
|
start.uri('/api/email/template')
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
209
|
+
.url_segment(email_template_id)
|
210
|
+
.body_handler(FusionAuth::JSONBodyHandler.new(request))
|
211
|
+
.post()
|
212
|
+
.go()
|
208
213
|
end
|
209
214
|
|
210
215
|
#
|
@@ -217,10 +222,10 @@ module FusionAuth
|
|
217
222
|
#
|
218
223
|
def create_family(family_id, request)
|
219
224
|
start.uri('/api/user/family')
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
225
|
+
.url_segment(family_id)
|
226
|
+
.body_handler(FusionAuth::JSONBodyHandler.new(request))
|
227
|
+
.post()
|
228
|
+
.go()
|
224
229
|
end
|
225
230
|
|
226
231
|
#
|
@@ -232,10 +237,10 @@ module FusionAuth
|
|
232
237
|
#
|
233
238
|
def create_group(group_id, request)
|
234
239
|
start.uri('/api/group')
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
240
|
+
.url_segment(group_id)
|
241
|
+
.body_handler(FusionAuth::JSONBodyHandler.new(request))
|
242
|
+
.post()
|
243
|
+
.go()
|
239
244
|
end
|
240
245
|
|
241
246
|
#
|
@@ -246,9 +251,9 @@ module FusionAuth
|
|
246
251
|
#
|
247
252
|
def create_group_members(request)
|
248
253
|
start.uri('/api/group/member')
|
249
|
-
|
250
|
-
|
251
|
-
|
254
|
+
.body_handler(FusionAuth::JSONBodyHandler.new(request))
|
255
|
+
.post()
|
256
|
+
.go()
|
252
257
|
end
|
253
258
|
|
254
259
|
#
|
@@ -260,10 +265,10 @@ module FusionAuth
|
|
260
265
|
#
|
261
266
|
def create_identity_provider(identity_provider_id, request)
|
262
267
|
start.uri('/api/identity-provider')
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
268
|
+
.url_segment(identity_provider_id)
|
269
|
+
.body_handler(FusionAuth::JSONBodyHandler.new(request))
|
270
|
+
.post()
|
271
|
+
.go()
|
267
272
|
end
|
268
273
|
|
269
274
|
#
|
@@ -275,10 +280,10 @@ module FusionAuth
|
|
275
280
|
#
|
276
281
|
def create_lambda(lambda_id, request)
|
277
282
|
start.uri('/api/lambda')
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
283
|
+
.url_segment(lambda_id)
|
284
|
+
.body_handler(FusionAuth::JSONBodyHandler.new(request))
|
285
|
+
.post()
|
286
|
+
.go()
|
282
287
|
end
|
283
288
|
|
284
289
|
#
|
@@ -290,10 +295,10 @@ module FusionAuth
|
|
290
295
|
#
|
291
296
|
def create_tenant(tenant_id, request)
|
292
297
|
start.uri('/api/tenant')
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
298
|
+
.url_segment(tenant_id)
|
299
|
+
.body_handler(FusionAuth::JSONBodyHandler.new(request))
|
300
|
+
.post()
|
301
|
+
.go()
|
297
302
|
end
|
298
303
|
|
299
304
|
#
|
@@ -305,10 +310,10 @@ module FusionAuth
|
|
305
310
|
#
|
306
311
|
def create_theme(theme_id, request)
|
307
312
|
start.uri('/api/theme')
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
313
|
+
.url_segment(theme_id)
|
314
|
+
.body_handler(FusionAuth::JSONBodyHandler.new(request))
|
315
|
+
.post()
|
316
|
+
.go()
|
312
317
|
end
|
313
318
|
|
314
319
|
#
|
@@ -320,10 +325,10 @@ module FusionAuth
|
|
320
325
|
#
|
321
326
|
def create_user(user_id, request)
|
322
327
|
start.uri('/api/user')
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
328
|
+
.url_segment(user_id)
|
329
|
+
.body_handler(FusionAuth::JSONBodyHandler.new(request))
|
330
|
+
.post()
|
331
|
+
.go()
|
327
332
|
end
|
328
333
|
|
329
334
|
#
|
@@ -336,10 +341,10 @@ module FusionAuth
|
|
336
341
|
#
|
337
342
|
def create_user_action(user_action_id, request)
|
338
343
|
start.uri('/api/user-action')
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
344
|
+
.url_segment(user_action_id)
|
345
|
+
.body_handler(FusionAuth::JSONBodyHandler.new(request))
|
346
|
+
.post()
|
347
|
+
.go()
|
343
348
|
end
|
344
349
|
|
345
350
|
#
|
@@ -352,10 +357,10 @@ module FusionAuth
|
|
352
357
|
#
|
353
358
|
def create_user_action_reason(user_action_reason_id, request)
|
354
359
|
start.uri('/api/user-action-reason')
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
360
|
+
.url_segment(user_action_reason_id)
|
361
|
+
.body_handler(FusionAuth::JSONBodyHandler.new(request))
|
362
|
+
.post()
|
363
|
+
.go()
|
359
364
|
end
|
360
365
|
|
361
366
|
#
|
@@ -367,10 +372,10 @@ module FusionAuth
|
|
367
372
|
#
|
368
373
|
def create_user_consent(user_consent_id, request)
|
369
374
|
start.uri('/api/user/consent')
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
375
|
+
.url_segment(user_consent_id)
|
376
|
+
.body_handler(FusionAuth::JSONBodyHandler.new(request))
|
377
|
+
.post()
|
378
|
+
.go()
|
374
379
|
end
|
375
380
|
|
376
381
|
#
|
@@ -382,10 +387,10 @@ module FusionAuth
|
|
382
387
|
#
|
383
388
|
def create_webhook(webhook_id, request)
|
384
389
|
start.uri('/api/webhook')
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
390
|
+
.url_segment(webhook_id)
|
391
|
+
.body_handler(FusionAuth::JSONBodyHandler.new(request))
|
392
|
+
.post()
|
393
|
+
.go()
|
389
394
|
end
|
390
395
|
|
391
396
|
#
|
@@ -396,9 +401,9 @@ module FusionAuth
|
|
396
401
|
#
|
397
402
|
def deactivate_application(application_id)
|
398
403
|
start.uri('/api/application')
|
399
|
-
|
400
|
-
|
401
|
-
|
404
|
+
.url_segment(application_id)
|
405
|
+
.delete()
|
406
|
+
.go()
|
402
407
|
end
|
403
408
|
|
404
409
|
#
|
@@ -409,9 +414,9 @@ module FusionAuth
|
|
409
414
|
#
|
410
415
|
def deactivate_user(user_id)
|
411
416
|
start.uri('/api/user')
|
412
|
-
|
413
|
-
|
414
|
-
|
417
|
+
.url_segment(user_id)
|
418
|
+
.delete()
|
419
|
+
.go()
|
415
420
|
end
|
416
421
|
|
417
422
|
#
|
@@ -422,9 +427,9 @@ module FusionAuth
|
|
422
427
|
#
|
423
428
|
def deactivate_user_action(user_action_id)
|
424
429
|
start.uri('/api/user-action')
|
425
|
-
|
426
|
-
|
427
|
-
|
430
|
+
.url_segment(user_action_id)
|
431
|
+
.delete()
|
432
|
+
.go()
|
428
433
|
end
|
429
434
|
|
430
435
|
#
|
@@ -435,9 +440,9 @@ module FusionAuth
|
|
435
440
|
#
|
436
441
|
def deactivate_users(user_ids)
|
437
442
|
start.uri('/api/user/bulk')
|
438
|
-
|
439
|
-
|
440
|
-
|
443
|
+
.url_parameter('userId', user_ids)
|
444
|
+
.delete()
|
445
|
+
.go()
|
441
446
|
end
|
442
447
|
|
443
448
|
#
|
@@ -451,10 +456,10 @@ module FusionAuth
|
|
451
456
|
#
|
452
457
|
def delete_application(application_id)
|
453
458
|
start.uri('/api/application')
|
454
|
-
|
455
|
-
|
456
|
-
|
457
|
-
|
459
|
+
.url_segment(application_id)
|
460
|
+
.url_parameter('hardDelete', true)
|
461
|
+
.delete()
|
462
|
+
.go()
|
458
463
|
end
|
459
464
|
|
460
465
|
#
|
@@ -467,11 +472,11 @@ module FusionAuth
|
|
467
472
|
#
|
468
473
|
def delete_application_role(application_id, role_id)
|
469
474
|
start.uri('/api/application')
|
470
|
-
|
471
|
-
|
472
|
-
|
473
|
-
|
474
|
-
|
475
|
+
.url_segment(application_id)
|
476
|
+
.url_segment("role")
|
477
|
+
.url_segment(role_id)
|
478
|
+
.delete()
|
479
|
+
.go()
|
475
480
|
end
|
476
481
|
|
477
482
|
#
|
@@ -482,9 +487,9 @@ module FusionAuth
|
|
482
487
|
#
|
483
488
|
def delete_consent(consent_id)
|
484
489
|
start.uri('/api/consent')
|
485
|
-
|
486
|
-
|
487
|
-
|
490
|
+
.url_segment(consent_id)
|
491
|
+
.delete()
|
492
|
+
.go()
|
488
493
|
end
|
489
494
|
|
490
495
|
#
|
@@ -495,9 +500,9 @@ module FusionAuth
|
|
495
500
|
#
|
496
501
|
def delete_email_template(email_template_id)
|
497
502
|
start.uri('/api/email/template')
|
498
|
-
|
499
|
-
|
500
|
-
|
503
|
+
.url_segment(email_template_id)
|
504
|
+
.delete()
|
505
|
+
.go()
|
501
506
|
end
|
502
507
|
|
503
508
|
#
|
@@ -508,9 +513,9 @@ module FusionAuth
|
|
508
513
|
#
|
509
514
|
def delete_group(group_id)
|
510
515
|
start.uri('/api/group')
|
511
|
-
|
512
|
-
|
513
|
-
|
516
|
+
.url_segment(group_id)
|
517
|
+
.delete()
|
518
|
+
.go()
|
514
519
|
end
|
515
520
|
|
516
521
|
#
|
@@ -521,9 +526,9 @@ module FusionAuth
|
|
521
526
|
#
|
522
527
|
def delete_group_members(request)
|
523
528
|
start.uri('/api/group/member')
|
524
|
-
|
525
|
-
|
526
|
-
|
529
|
+
.body_handler(FusionAuth::JSONBodyHandler.new(request))
|
530
|
+
.delete()
|
531
|
+
.go()
|
527
532
|
end
|
528
533
|
|
529
534
|
#
|
@@ -534,9 +539,9 @@ module FusionAuth
|
|
534
539
|
#
|
535
540
|
def delete_identity_provider(identity_provider_id)
|
536
541
|
start.uri('/api/identity-provider')
|
537
|
-
|
538
|
-
|
539
|
-
|
542
|
+
.url_segment(identity_provider_id)
|
543
|
+
.delete()
|
544
|
+
.go()
|
540
545
|
end
|
541
546
|
|
542
547
|
#
|
@@ -547,9 +552,9 @@ module FusionAuth
|
|
547
552
|
#
|
548
553
|
def delete_key(key_od)
|
549
554
|
start.uri('/api/key')
|
550
|
-
|
551
|
-
|
552
|
-
|
555
|
+
.url_segment(key_od)
|
556
|
+
.delete()
|
557
|
+
.go()
|
553
558
|
end
|
554
559
|
|
555
560
|
#
|
@@ -560,9 +565,9 @@ module FusionAuth
|
|
560
565
|
#
|
561
566
|
def delete_lambda(lambda_id)
|
562
567
|
start.uri('/api/lambda')
|
563
|
-
|
564
|
-
|
565
|
-
|
568
|
+
.url_segment(lambda_id)
|
569
|
+
.delete()
|
570
|
+
.go()
|
566
571
|
end
|
567
572
|
|
568
573
|
#
|
@@ -574,10 +579,10 @@ module FusionAuth
|
|
574
579
|
#
|
575
580
|
def delete_registration(user_id, application_id)
|
576
581
|
start.uri('/api/user/registration')
|
577
|
-
|
578
|
-
|
579
|
-
|
580
|
-
|
582
|
+
.url_segment(user_id)
|
583
|
+
.url_segment(application_id)
|
584
|
+
.delete()
|
585
|
+
.go()
|
581
586
|
end
|
582
587
|
|
583
588
|
#
|
@@ -588,9 +593,9 @@ module FusionAuth
|
|
588
593
|
#
|
589
594
|
def delete_tenant(tenant_id)
|
590
595
|
start.uri('/api/tenant')
|
591
|
-
|
592
|
-
|
593
|
-
|
596
|
+
.url_segment(tenant_id)
|
597
|
+
.delete()
|
598
|
+
.go()
|
594
599
|
end
|
595
600
|
|
596
601
|
#
|
@@ -601,9 +606,9 @@ module FusionAuth
|
|
601
606
|
#
|
602
607
|
def delete_theme(theme_id)
|
603
608
|
start.uri('/api/theme')
|
604
|
-
|
605
|
-
|
606
|
-
|
609
|
+
.url_segment(theme_id)
|
610
|
+
.delete()
|
611
|
+
.go()
|
607
612
|
end
|
608
613
|
|
609
614
|
#
|
@@ -615,10 +620,10 @@ module FusionAuth
|
|
615
620
|
#
|
616
621
|
def delete_user(user_id)
|
617
622
|
start.uri('/api/user')
|
618
|
-
|
619
|
-
|
620
|
-
|
621
|
-
|
623
|
+
.url_segment(user_id)
|
624
|
+
.url_parameter('hardDelete', true)
|
625
|
+
.delete()
|
626
|
+
.go()
|
622
627
|
end
|
623
628
|
|
624
629
|
#
|
@@ -630,10 +635,10 @@ module FusionAuth
|
|
630
635
|
#
|
631
636
|
def delete_user_action(user_action_id)
|
632
637
|
start.uri('/api/user-action')
|
633
|
-
|
634
|
-
|
635
|
-
|
636
|
-
|
638
|
+
.url_segment(user_action_id)
|
639
|
+
.url_parameter('hardDelete', true)
|
640
|
+
.delete()
|
641
|
+
.go()
|
637
642
|
end
|
638
643
|
|
639
644
|
#
|
@@ -644,9 +649,9 @@ module FusionAuth
|
|
644
649
|
#
|
645
650
|
def delete_user_action_reason(user_action_reason_id)
|
646
651
|
start.uri('/api/user-action-reason')
|
647
|
-
|
648
|
-
|
649
|
-
|
652
|
+
.url_segment(user_action_reason_id)
|
653
|
+
.delete()
|
654
|
+
.go()
|
650
655
|
end
|
651
656
|
|
652
657
|
#
|
@@ -657,9 +662,9 @@ module FusionAuth
|
|
657
662
|
#
|
658
663
|
def delete_users(request)
|
659
664
|
start.uri('/api/user/bulk')
|
660
|
-
|
661
|
-
|
662
|
-
|
665
|
+
.body_handler(FusionAuth::JSONBodyHandler.new(request))
|
666
|
+
.delete()
|
667
|
+
.go()
|
663
668
|
end
|
664
669
|
|
665
670
|
#
|
@@ -670,9 +675,9 @@ module FusionAuth
|
|
670
675
|
#
|
671
676
|
def delete_webhook(webhook_id)
|
672
677
|
start.uri('/api/webhook')
|
673
|
-
|
674
|
-
|
675
|
-
|
678
|
+
.url_segment(webhook_id)
|
679
|
+
.delete()
|
680
|
+
.go()
|
676
681
|
end
|
677
682
|
|
678
683
|
#
|
@@ -684,10 +689,10 @@ module FusionAuth
|
|
684
689
|
#
|
685
690
|
def disable_two_factor(user_id, code)
|
686
691
|
start.uri('/api/user/two-factor')
|
687
|
-
|
688
|
-
|
689
|
-
|
690
|
-
|
692
|
+
.url_parameter('userId', user_id)
|
693
|
+
.url_parameter('code', code)
|
694
|
+
.delete()
|
695
|
+
.go()
|
691
696
|
end
|
692
697
|
|
693
698
|
#
|
@@ -699,10 +704,60 @@ module FusionAuth
|
|
699
704
|
#
|
700
705
|
def enable_two_factor(user_id, request)
|
701
706
|
start.uri('/api/user/two-factor')
|
702
|
-
|
703
|
-
|
704
|
-
|
705
|
-
|
707
|
+
.url_segment(user_id)
|
708
|
+
.body_handler(FusionAuth::JSONBodyHandler.new(request))
|
709
|
+
.post()
|
710
|
+
.go()
|
711
|
+
end
|
712
|
+
|
713
|
+
#
|
714
|
+
# Exchanges an OAuth authorization code for an access token.
|
715
|
+
# If you will be using the Authorization Code grant, you will make a request to the Token endpoint to exchange the authorization code returned from the Authorize endpoint for an access token.
|
716
|
+
#
|
717
|
+
# @param code [string] The authorization code returned on the /oauth2/authorize response.
|
718
|
+
# @param client_id [string] (Optional) The unique client identifier. The client Id is the Id of the FusionAuth Application in which you you are attempting to authenticate. This parameter is optional when the Authorization header is provided.
|
719
|
+
# @param client_secret [string] (Optional) The client secret. This value may optionally be provided in the request body instead of the Authorization header.
|
720
|
+
# @param redirect_uri [string] The URI to redirect to upon a successful request.
|
721
|
+
# @return [FusionAuth::ClientResponse] The ClientResponse object.
|
722
|
+
#
|
723
|
+
def exchange_o_auth_code_for_access_token(code, client_id, client_secret, redirect_uri)
|
724
|
+
body = {
|
725
|
+
"code" => code,
|
726
|
+
"client_id" => client_id,
|
727
|
+
"client_secret" => client_secret,
|
728
|
+
"grant_type" => "authorization_code",
|
729
|
+
"redirect_uri" => redirect_uri
|
730
|
+
}
|
731
|
+
startAnonymous.uri('/oauth2/token')
|
732
|
+
.body_handler(FusionAuth::FormDataBodyHandler.new(body))
|
733
|
+
.post()
|
734
|
+
.go()
|
735
|
+
end
|
736
|
+
|
737
|
+
#
|
738
|
+
# Exchange a Refresh Token for an Access Token.
|
739
|
+
# If you will be using the Refresh Token Grant, you will make a request to the Token endpoint to exchange the user’s refresh token for an access token.
|
740
|
+
#
|
741
|
+
# @param refresh_token [string] The refresh token that you would like to use to exchange for an access token.
|
742
|
+
# @param client_id [string] (Optional) The unique client identifier. The client Id is the Id of the FusionAuth Application in which you you are attempting to authenticate. This parameter is optional when the Authorization header is provided.
|
743
|
+
# @param client_secret [string] (Optional) The client secret. This value may optionally be provided in the request body instead of the Authorization header.
|
744
|
+
# @param scope [string] (Optional) This parameter is optional and if omitted, the same scope requested during the authorization request will be used. If provided the scopes must match those requested during the initial authorization request.
|
745
|
+
# @param user_code [string] (Optional) The end-user verification code. This code is required if using this endpoint to approve the Device Authorization.
|
746
|
+
# @return [FusionAuth::ClientResponse] The ClientResponse object.
|
747
|
+
#
|
748
|
+
def exchange_refresh_token_for_access_token(refresh_token, client_id, client_secret, scope, user_code)
|
749
|
+
body = {
|
750
|
+
"refresh_token" => refresh_token,
|
751
|
+
"client_id" => client_id,
|
752
|
+
"client_secret" => client_secret,
|
753
|
+
"grant_type" => "refresh_token",
|
754
|
+
"scope" => scope,
|
755
|
+
"user_code" => user_code
|
756
|
+
}
|
757
|
+
startAnonymous.uri('/oauth2/token')
|
758
|
+
.body_handler(FusionAuth::FormDataBodyHandler.new(body))
|
759
|
+
.post()
|
760
|
+
.go()
|
706
761
|
end
|
707
762
|
|
708
763
|
#
|
@@ -712,10 +767,38 @@ module FusionAuth
|
|
712
767
|
# @return [FusionAuth::ClientResponse] The ClientResponse object.
|
713
768
|
#
|
714
769
|
def exchange_refresh_token_for_jwt(request)
|
715
|
-
|
716
|
-
|
717
|
-
|
718
|
-
|
770
|
+
startAnonymous.uri('/api/jwt/refresh')
|
771
|
+
.body_handler(FusionAuth::JSONBodyHandler.new(request))
|
772
|
+
.post()
|
773
|
+
.go()
|
774
|
+
end
|
775
|
+
|
776
|
+
#
|
777
|
+
# Exchange User Credentials for a Token.
|
778
|
+
# If you will be using the Resource Owner Password Credential Grant, you will make a request to the Token endpoint to exchange the user’s email and password for an access token.
|
779
|
+
#
|
780
|
+
# @param username [string] The login identifier of the user. The login identifier can be either the email or the username.
|
781
|
+
# @param password [string] The user’s password.
|
782
|
+
# @param client_id [string] (Optional) The unique client identifier. The client Id is the Id of the FusionAuth Application in which you you are attempting to authenticate. This parameter is optional when the Authorization header is provided.
|
783
|
+
# @param client_secret [string] (Optional) The client secret. This value may optionally be provided in the request body instead of the Authorization header.
|
784
|
+
# @param scope [string] (Optional) This parameter is optional and if omitted, the same scope requested during the authorization request will be used. If provided the scopes must match those requested during the initial authorization request.
|
785
|
+
# @param user_code [string] (Optional) The end-user verification code. This code is required if using this endpoint to approve the Device Authorization.
|
786
|
+
# @return [FusionAuth::ClientResponse] The ClientResponse object.
|
787
|
+
#
|
788
|
+
def exchange_user_credentials_for_access_token(username, password, client_id, client_secret, scope, user_code)
|
789
|
+
body = {
|
790
|
+
"username" => username,
|
791
|
+
"password" => password,
|
792
|
+
"client_id" => client_id,
|
793
|
+
"client_secret" => client_secret,
|
794
|
+
"grant_type" => "password",
|
795
|
+
"scope" => scope,
|
796
|
+
"user_code" => user_code
|
797
|
+
}
|
798
|
+
startAnonymous.uri('/oauth2/token')
|
799
|
+
.body_handler(FusionAuth::FormDataBodyHandler.new(body))
|
800
|
+
.post()
|
801
|
+
.go()
|
719
802
|
end
|
720
803
|
|
721
804
|
#
|
@@ -725,10 +808,10 @@ module FusionAuth
|
|
725
808
|
# @return [FusionAuth::ClientResponse] The ClientResponse object.
|
726
809
|
#
|
727
810
|
def forgot_password(request)
|
728
|
-
|
729
|
-
|
730
|
-
|
731
|
-
|
811
|
+
startAnonymous.uri('/api/user/forgot-password')
|
812
|
+
.body_handler(FusionAuth::JSONBodyHandler.new(request))
|
813
|
+
.post()
|
814
|
+
.go()
|
732
815
|
end
|
733
816
|
|
734
817
|
#
|
@@ -740,10 +823,10 @@ module FusionAuth
|
|
740
823
|
#
|
741
824
|
def generate_email_verification_id(email)
|
742
825
|
start.uri('/api/user/verify-email')
|
743
|
-
|
744
|
-
|
745
|
-
|
746
|
-
|
826
|
+
.url_parameter('email', email)
|
827
|
+
.url_parameter('sendVerifyEmail', false)
|
828
|
+
.put()
|
829
|
+
.go()
|
747
830
|
end
|
748
831
|
|
749
832
|
#
|
@@ -755,10 +838,10 @@ module FusionAuth
|
|
755
838
|
#
|
756
839
|
def generate_key(key_id, request)
|
757
840
|
start.uri('/api/key/generate')
|
758
|
-
|
759
|
-
|
760
|
-
|
761
|
-
|
841
|
+
.url_segment(key_id)
|
842
|
+
.body_handler(FusionAuth::JSONBodyHandler.new(request))
|
843
|
+
.post()
|
844
|
+
.go()
|
762
845
|
end
|
763
846
|
|
764
847
|
#
|
@@ -771,11 +854,11 @@ module FusionAuth
|
|
771
854
|
#
|
772
855
|
def generate_registration_verification_id(email, application_id)
|
773
856
|
start.uri('/api/user/verify-registration')
|
774
|
-
|
775
|
-
|
776
|
-
|
777
|
-
|
778
|
-
|
857
|
+
.url_parameter('email', email)
|
858
|
+
.url_parameter('sendVerifyPasswordEmail', false)
|
859
|
+
.url_parameter('applicationId', application_id)
|
860
|
+
.put()
|
861
|
+
.go()
|
779
862
|
end
|
780
863
|
|
781
864
|
#
|
@@ -787,8 +870,8 @@ module FusionAuth
|
|
787
870
|
#
|
788
871
|
def generate_two_factor_secret()
|
789
872
|
start.uri('/api/two-factor/secret')
|
790
|
-
|
791
|
-
|
873
|
+
.get()
|
874
|
+
.go()
|
792
875
|
end
|
793
876
|
|
794
877
|
#
|
@@ -801,9 +884,9 @@ module FusionAuth
|
|
801
884
|
#
|
802
885
|
def generate_two_factor_secret_using_jwt(encoded_jwt)
|
803
886
|
start.uri('/api/two-factor/secret')
|
804
|
-
|
805
|
-
|
806
|
-
|
887
|
+
.authorization('JWT ' + encoded_jwt)
|
888
|
+
.get()
|
889
|
+
.go()
|
807
890
|
end
|
808
891
|
|
809
892
|
#
|
@@ -815,10 +898,10 @@ module FusionAuth
|
|
815
898
|
# @return [FusionAuth::ClientResponse] The ClientResponse object.
|
816
899
|
#
|
817
900
|
def identity_provider_login(request)
|
818
|
-
|
819
|
-
|
820
|
-
|
821
|
-
|
901
|
+
startAnonymous.uri('/api/identity-provider/login')
|
902
|
+
.body_handler(FusionAuth::JSONBodyHandler.new(request))
|
903
|
+
.post()
|
904
|
+
.go()
|
822
905
|
end
|
823
906
|
|
824
907
|
#
|
@@ -830,10 +913,10 @@ module FusionAuth
|
|
830
913
|
#
|
831
914
|
def import_key(key_id, request)
|
832
915
|
start.uri('/api/key/import')
|
833
|
-
|
834
|
-
|
835
|
-
|
836
|
-
|
916
|
+
.url_segment(key_id)
|
917
|
+
.body_handler(FusionAuth::JSONBodyHandler.new(request))
|
918
|
+
.post()
|
919
|
+
.go()
|
837
920
|
end
|
838
921
|
|
839
922
|
#
|
@@ -846,9 +929,9 @@ module FusionAuth
|
|
846
929
|
#
|
847
930
|
def import_users(request)
|
848
931
|
start.uri('/api/user/import')
|
849
|
-
|
850
|
-
|
851
|
-
|
932
|
+
.body_handler(FusionAuth::JSONBodyHandler.new(request))
|
933
|
+
.post()
|
934
|
+
.go()
|
852
935
|
end
|
853
936
|
|
854
937
|
#
|
@@ -864,10 +947,10 @@ module FusionAuth
|
|
864
947
|
#
|
865
948
|
def issue_jwt(application_id, encoded_jwt)
|
866
949
|
start.uri('/api/jwt/issue')
|
867
|
-
|
868
|
-
|
869
|
-
|
870
|
-
|
950
|
+
.authorization('JWT ' + encoded_jwt)
|
951
|
+
.url_parameter('applicationId', application_id)
|
952
|
+
.get()
|
953
|
+
.go()
|
871
954
|
end
|
872
955
|
|
873
956
|
#
|
@@ -880,9 +963,9 @@ module FusionAuth
|
|
880
963
|
#
|
881
964
|
def login(request)
|
882
965
|
start.uri('/api/login')
|
883
|
-
|
884
|
-
|
885
|
-
|
966
|
+
.body_handler(FusionAuth::JSONBodyHandler.new(request))
|
967
|
+
.post()
|
968
|
+
.go()
|
886
969
|
end
|
887
970
|
|
888
971
|
#
|
@@ -899,11 +982,11 @@ module FusionAuth
|
|
899
982
|
#
|
900
983
|
def login_ping(user_id, application_id, caller_ip_address)
|
901
984
|
start.uri('/api/login')
|
902
|
-
|
903
|
-
|
904
|
-
|
905
|
-
|
906
|
-
|
985
|
+
.url_segment(user_id)
|
986
|
+
.url_segment(application_id)
|
987
|
+
.url_parameter('ipAddress', caller_ip_address)
|
988
|
+
.put()
|
989
|
+
.go()
|
907
990
|
end
|
908
991
|
|
909
992
|
#
|
@@ -918,11 +1001,11 @@ module FusionAuth
|
|
918
1001
|
# @return [FusionAuth::ClientResponse] The ClientResponse object.
|
919
1002
|
#
|
920
1003
|
def logout(global, refresh_token)
|
921
|
-
|
922
|
-
|
923
|
-
|
924
|
-
|
925
|
-
|
1004
|
+
startAnonymous.uri('/api/logout')
|
1005
|
+
.url_parameter('global', global)
|
1006
|
+
.url_parameter('refreshToken', refresh_token)
|
1007
|
+
.post()
|
1008
|
+
.go()
|
926
1009
|
end
|
927
1010
|
|
928
1011
|
#
|
@@ -934,9 +1017,9 @@ module FusionAuth
|
|
934
1017
|
#
|
935
1018
|
def lookup_identity_provider(domain)
|
936
1019
|
start.uri('/api/identity-provider/lookup')
|
937
|
-
|
938
|
-
|
939
|
-
|
1020
|
+
.url_parameter('domain', domain)
|
1021
|
+
.get()
|
1022
|
+
.go()
|
940
1023
|
end
|
941
1024
|
|
942
1025
|
#
|
@@ -949,10 +1032,10 @@ module FusionAuth
|
|
949
1032
|
#
|
950
1033
|
def modify_action(action_id, request)
|
951
1034
|
start.uri('/api/user/action')
|
952
|
-
|
953
|
-
|
954
|
-
|
955
|
-
|
1035
|
+
.url_segment(action_id)
|
1036
|
+
.body_handler(FusionAuth::JSONBodyHandler.new(request))
|
1037
|
+
.put()
|
1038
|
+
.go()
|
956
1039
|
end
|
957
1040
|
|
958
1041
|
#
|
@@ -962,10 +1045,249 @@ module FusionAuth
|
|
962
1045
|
# @return [FusionAuth::ClientResponse] The ClientResponse object.
|
963
1046
|
#
|
964
1047
|
def passwordless_login(request)
|
965
|
-
|
966
|
-
|
967
|
-
|
968
|
-
|
1048
|
+
startAnonymous.uri('/api/passwordless/login')
|
1049
|
+
.body_handler(FusionAuth::JSONBodyHandler.new(request))
|
1050
|
+
.post()
|
1051
|
+
.go()
|
1052
|
+
end
|
1053
|
+
|
1054
|
+
#
|
1055
|
+
# Updates, via PATCH, the application with the given Id.
|
1056
|
+
#
|
1057
|
+
# @param application_id [string] The Id of the application to update.
|
1058
|
+
# @param request [OpenStruct, Hash] The request that contains just the new application information.
|
1059
|
+
# @return [FusionAuth::ClientResponse] The ClientResponse object.
|
1060
|
+
#
|
1061
|
+
def patch_application(application_id, request)
|
1062
|
+
start.uri('/api/application')
|
1063
|
+
.url_segment(application_id)
|
1064
|
+
.body_handler(FusionAuth::JSONBodyHandler.new(request))
|
1065
|
+
.patch()
|
1066
|
+
.go()
|
1067
|
+
end
|
1068
|
+
|
1069
|
+
#
|
1070
|
+
# Updates, via PATCH, the application role with the given id for the application.
|
1071
|
+
#
|
1072
|
+
# @param application_id [string] The Id of the application that the role belongs to.
|
1073
|
+
# @param role_id [string] The Id of the role to update.
|
1074
|
+
# @param request [OpenStruct, Hash] The request that contains just the new role information.
|
1075
|
+
# @return [FusionAuth::ClientResponse] The ClientResponse object.
|
1076
|
+
#
|
1077
|
+
def patch_application_role(application_id, role_id, request)
|
1078
|
+
start.uri('/api/application')
|
1079
|
+
.url_segment(application_id)
|
1080
|
+
.url_segment("role")
|
1081
|
+
.url_segment(role_id)
|
1082
|
+
.body_handler(FusionAuth::JSONBodyHandler.new(request))
|
1083
|
+
.patch()
|
1084
|
+
.go()
|
1085
|
+
end
|
1086
|
+
|
1087
|
+
#
|
1088
|
+
# Updates, via PATCH, the consent with the given Id.
|
1089
|
+
#
|
1090
|
+
# @param consent_id [string] The Id of the consent to update.
|
1091
|
+
# @param request [OpenStruct, Hash] The request that contains just the new consent information.
|
1092
|
+
# @return [FusionAuth::ClientResponse] The ClientResponse object.
|
1093
|
+
#
|
1094
|
+
def patch_consent(consent_id, request)
|
1095
|
+
start.uri('/api/consent')
|
1096
|
+
.url_segment(consent_id)
|
1097
|
+
.body_handler(FusionAuth::JSONBodyHandler.new(request))
|
1098
|
+
.patch()
|
1099
|
+
.go()
|
1100
|
+
end
|
1101
|
+
|
1102
|
+
#
|
1103
|
+
# Updates, via PATCH, the email template with the given Id.
|
1104
|
+
#
|
1105
|
+
# @param email_template_id [string] The Id of the email template to update.
|
1106
|
+
# @param request [OpenStruct, Hash] The request that contains just the new email template information.
|
1107
|
+
# @return [FusionAuth::ClientResponse] The ClientResponse object.
|
1108
|
+
#
|
1109
|
+
def patch_email_template(email_template_id, request)
|
1110
|
+
start.uri('/api/email/template')
|
1111
|
+
.url_segment(email_template_id)
|
1112
|
+
.body_handler(FusionAuth::JSONBodyHandler.new(request))
|
1113
|
+
.patch()
|
1114
|
+
.go()
|
1115
|
+
end
|
1116
|
+
|
1117
|
+
#
|
1118
|
+
# Updates, via PATCH, the group with the given Id.
|
1119
|
+
#
|
1120
|
+
# @param group_id [string] The Id of the group to update.
|
1121
|
+
# @param request [OpenStruct, Hash] The request that contains just the new group information.
|
1122
|
+
# @return [FusionAuth::ClientResponse] The ClientResponse object.
|
1123
|
+
#
|
1124
|
+
def patch_group(group_id, request)
|
1125
|
+
start.uri('/api/group')
|
1126
|
+
.url_segment(group_id)
|
1127
|
+
.body_handler(FusionAuth::JSONBodyHandler.new(request))
|
1128
|
+
.patch()
|
1129
|
+
.go()
|
1130
|
+
end
|
1131
|
+
|
1132
|
+
#
|
1133
|
+
# Updates, via PATCH, the identity provider with the given Id.
|
1134
|
+
#
|
1135
|
+
# @param identity_provider_id [string] The Id of the identity provider to update.
|
1136
|
+
# @param request [OpenStruct, Hash] The request object that contains just the updated identity provider information.
|
1137
|
+
# @return [FusionAuth::ClientResponse] The ClientResponse object.
|
1138
|
+
#
|
1139
|
+
def patch_identity_provider(identity_provider_id, request)
|
1140
|
+
start.uri('/api/identity-provider')
|
1141
|
+
.url_segment(identity_provider_id)
|
1142
|
+
.body_handler(FusionAuth::JSONBodyHandler.new(request))
|
1143
|
+
.patch()
|
1144
|
+
.go()
|
1145
|
+
end
|
1146
|
+
|
1147
|
+
#
|
1148
|
+
# Updates, via PATCH, the available integrations.
|
1149
|
+
#
|
1150
|
+
# @param request [OpenStruct, Hash] The request that contains just the new integration information.
|
1151
|
+
# @return [FusionAuth::ClientResponse] The ClientResponse object.
|
1152
|
+
#
|
1153
|
+
def patch_integrations(request)
|
1154
|
+
start.uri('/api/integration')
|
1155
|
+
.body_handler(FusionAuth::JSONBodyHandler.new(request))
|
1156
|
+
.patch()
|
1157
|
+
.go()
|
1158
|
+
end
|
1159
|
+
|
1160
|
+
#
|
1161
|
+
# Updates, via PATCH, the lambda with the given Id.
|
1162
|
+
#
|
1163
|
+
# @param lambda_id [string] The Id of the lambda to update.
|
1164
|
+
# @param request [OpenStruct, Hash] The request that contains just the new lambda information.
|
1165
|
+
# @return [FusionAuth::ClientResponse] The ClientResponse object.
|
1166
|
+
#
|
1167
|
+
def patch_lambda(lambda_id, request)
|
1168
|
+
start.uri('/api/lambda')
|
1169
|
+
.url_segment(lambda_id)
|
1170
|
+
.body_handler(FusionAuth::JSONBodyHandler.new(request))
|
1171
|
+
.patch()
|
1172
|
+
.go()
|
1173
|
+
end
|
1174
|
+
|
1175
|
+
#
|
1176
|
+
# Updates, via PATCH, the registration for the user with the given id and the application defined in the request.
|
1177
|
+
#
|
1178
|
+
# @param user_id [string] The Id of the user whose registration is going to be updated.
|
1179
|
+
# @param request [OpenStruct, Hash] The request that contains just the new registration information.
|
1180
|
+
# @return [FusionAuth::ClientResponse] The ClientResponse object.
|
1181
|
+
#
|
1182
|
+
def patch_registration(user_id, request)
|
1183
|
+
start.uri('/api/user/registration')
|
1184
|
+
.url_segment(user_id)
|
1185
|
+
.body_handler(FusionAuth::JSONBodyHandler.new(request))
|
1186
|
+
.patch()
|
1187
|
+
.go()
|
1188
|
+
end
|
1189
|
+
|
1190
|
+
#
|
1191
|
+
# Updates, via PATCH, the system configuration.
|
1192
|
+
#
|
1193
|
+
# @param request [OpenStruct, Hash] The request that contains just the new system configuration information.
|
1194
|
+
# @return [FusionAuth::ClientResponse] The ClientResponse object.
|
1195
|
+
#
|
1196
|
+
def patch_system_configuration(request)
|
1197
|
+
start.uri('/api/system-configuration')
|
1198
|
+
.body_handler(FusionAuth::JSONBodyHandler.new(request))
|
1199
|
+
.patch()
|
1200
|
+
.go()
|
1201
|
+
end
|
1202
|
+
|
1203
|
+
#
|
1204
|
+
# Updates, via PATCH, the tenant with the given Id.
|
1205
|
+
#
|
1206
|
+
# @param tenant_id [string] The Id of the tenant to update.
|
1207
|
+
# @param request [OpenStruct, Hash] The request that contains just the new tenant information.
|
1208
|
+
# @return [FusionAuth::ClientResponse] The ClientResponse object.
|
1209
|
+
#
|
1210
|
+
def patch_tenant(tenant_id, request)
|
1211
|
+
start.uri('/api/tenant')
|
1212
|
+
.url_segment(tenant_id)
|
1213
|
+
.body_handler(FusionAuth::JSONBodyHandler.new(request))
|
1214
|
+
.patch()
|
1215
|
+
.go()
|
1216
|
+
end
|
1217
|
+
|
1218
|
+
#
|
1219
|
+
# Updates, via PATCH, the theme with the given Id.
|
1220
|
+
#
|
1221
|
+
# @param theme_id [string] The Id of the theme to update.
|
1222
|
+
# @param request [OpenStruct, Hash] The request that contains just the new theme information.
|
1223
|
+
# @return [FusionAuth::ClientResponse] The ClientResponse object.
|
1224
|
+
#
|
1225
|
+
def patch_theme(theme_id, request)
|
1226
|
+
start.uri('/api/theme')
|
1227
|
+
.url_segment(theme_id)
|
1228
|
+
.body_handler(FusionAuth::JSONBodyHandler.new(request))
|
1229
|
+
.patch()
|
1230
|
+
.go()
|
1231
|
+
end
|
1232
|
+
|
1233
|
+
#
|
1234
|
+
# Updates, via PATCH, the user with the given Id.
|
1235
|
+
#
|
1236
|
+
# @param user_id [string] The Id of the user to update.
|
1237
|
+
# @param request [OpenStruct, Hash] The request that contains just the new user information.
|
1238
|
+
# @return [FusionAuth::ClientResponse] The ClientResponse object.
|
1239
|
+
#
|
1240
|
+
def patch_user(user_id, request)
|
1241
|
+
start.uri('/api/user')
|
1242
|
+
.url_segment(user_id)
|
1243
|
+
.body_handler(FusionAuth::JSONBodyHandler.new(request))
|
1244
|
+
.patch()
|
1245
|
+
.go()
|
1246
|
+
end
|
1247
|
+
|
1248
|
+
#
|
1249
|
+
# Updates, via PATCH, the user action with the given Id.
|
1250
|
+
#
|
1251
|
+
# @param user_action_id [string] The Id of the user action to update.
|
1252
|
+
# @param request [OpenStruct, Hash] The request that contains just the new user action information.
|
1253
|
+
# @return [FusionAuth::ClientResponse] The ClientResponse object.
|
1254
|
+
#
|
1255
|
+
def patch_user_action(user_action_id, request)
|
1256
|
+
start.uri('/api/user-action')
|
1257
|
+
.url_segment(user_action_id)
|
1258
|
+
.body_handler(FusionAuth::JSONBodyHandler.new(request))
|
1259
|
+
.patch()
|
1260
|
+
.go()
|
1261
|
+
end
|
1262
|
+
|
1263
|
+
#
|
1264
|
+
# Updates, via PATCH, the user action reason with the given Id.
|
1265
|
+
#
|
1266
|
+
# @param user_action_reason_id [string] The Id of the user action reason to update.
|
1267
|
+
# @param request [OpenStruct, Hash] The request that contains just the new user action reason information.
|
1268
|
+
# @return [FusionAuth::ClientResponse] The ClientResponse object.
|
1269
|
+
#
|
1270
|
+
def patch_user_action_reason(user_action_reason_id, request)
|
1271
|
+
start.uri('/api/user-action-reason')
|
1272
|
+
.url_segment(user_action_reason_id)
|
1273
|
+
.body_handler(FusionAuth::JSONBodyHandler.new(request))
|
1274
|
+
.patch()
|
1275
|
+
.go()
|
1276
|
+
end
|
1277
|
+
|
1278
|
+
#
|
1279
|
+
# Updates, via PATCH, a single User consent by Id.
|
1280
|
+
#
|
1281
|
+
# @param user_consent_id [string] The User Consent Id
|
1282
|
+
# @param request [OpenStruct, Hash] The request that contains just the new user consent information.
|
1283
|
+
# @return [FusionAuth::ClientResponse] The ClientResponse object.
|
1284
|
+
#
|
1285
|
+
def patch_user_consent(user_consent_id, request)
|
1286
|
+
start.uri('/api/user/consent')
|
1287
|
+
.url_segment(user_consent_id)
|
1288
|
+
.body_handler(FusionAuth::JSONBodyHandler.new(request))
|
1289
|
+
.patch()
|
1290
|
+
.go()
|
969
1291
|
end
|
970
1292
|
|
971
1293
|
#
|
@@ -976,10 +1298,10 @@ module FusionAuth
|
|
976
1298
|
#
|
977
1299
|
def reactivate_application(application_id)
|
978
1300
|
start.uri('/api/application')
|
979
|
-
|
980
|
-
|
981
|
-
|
982
|
-
|
1301
|
+
.url_segment(application_id)
|
1302
|
+
.url_parameter('reactivate', true)
|
1303
|
+
.put()
|
1304
|
+
.go()
|
983
1305
|
end
|
984
1306
|
|
985
1307
|
#
|
@@ -990,10 +1312,10 @@ module FusionAuth
|
|
990
1312
|
#
|
991
1313
|
def reactivate_user(user_id)
|
992
1314
|
start.uri('/api/user')
|
993
|
-
|
994
|
-
|
995
|
-
|
996
|
-
|
1315
|
+
.url_segment(user_id)
|
1316
|
+
.url_parameter('reactivate', true)
|
1317
|
+
.put()
|
1318
|
+
.go()
|
997
1319
|
end
|
998
1320
|
|
999
1321
|
#
|
@@ -1004,10 +1326,10 @@ module FusionAuth
|
|
1004
1326
|
#
|
1005
1327
|
def reactivate_user_action(user_action_id)
|
1006
1328
|
start.uri('/api/user-action')
|
1007
|
-
|
1008
|
-
|
1009
|
-
|
1010
|
-
|
1329
|
+
.url_segment(user_action_id)
|
1330
|
+
.url_parameter('reactivate', true)
|
1331
|
+
.put()
|
1332
|
+
.go()
|
1011
1333
|
end
|
1012
1334
|
|
1013
1335
|
#
|
@@ -1017,10 +1339,10 @@ module FusionAuth
|
|
1017
1339
|
# @return [FusionAuth::ClientResponse] The ClientResponse object.
|
1018
1340
|
#
|
1019
1341
|
def reconcile_jwt(request)
|
1020
|
-
|
1021
|
-
|
1022
|
-
|
1023
|
-
|
1342
|
+
startAnonymous.uri('/api/jwt/reconcile')
|
1343
|
+
.body_handler(FusionAuth::JSONBodyHandler.new(request))
|
1344
|
+
.post()
|
1345
|
+
.go()
|
1024
1346
|
end
|
1025
1347
|
|
1026
1348
|
#
|
@@ -1033,8 +1355,8 @@ module FusionAuth
|
|
1033
1355
|
#
|
1034
1356
|
def refresh_user_search_index()
|
1035
1357
|
start.uri('/api/user/search')
|
1036
|
-
|
1037
|
-
|
1358
|
+
.put()
|
1359
|
+
.go()
|
1038
1360
|
end
|
1039
1361
|
|
1040
1362
|
#
|
@@ -1050,10 +1372,10 @@ module FusionAuth
|
|
1050
1372
|
#
|
1051
1373
|
def register(user_id, request)
|
1052
1374
|
start.uri('/api/user/registration')
|
1053
|
-
|
1054
|
-
|
1055
|
-
|
1056
|
-
|
1375
|
+
.url_segment(user_id)
|
1376
|
+
.body_handler(FusionAuth::JSONBodyHandler.new(request))
|
1377
|
+
.post()
|
1378
|
+
.go()
|
1057
1379
|
end
|
1058
1380
|
|
1059
1381
|
#
|
@@ -1065,10 +1387,10 @@ module FusionAuth
|
|
1065
1387
|
#
|
1066
1388
|
def remove_user_from_family(family_id, user_id)
|
1067
1389
|
start.uri('/api/user/family')
|
1068
|
-
|
1069
|
-
|
1070
|
-
|
1071
|
-
|
1390
|
+
.url_segment(family_id)
|
1391
|
+
.url_segment(user_id)
|
1392
|
+
.delete()
|
1393
|
+
.go()
|
1072
1394
|
end
|
1073
1395
|
|
1074
1396
|
#
|
@@ -1078,10 +1400,10 @@ module FusionAuth
|
|
1078
1400
|
# @return [FusionAuth::ClientResponse] The ClientResponse object.
|
1079
1401
|
#
|
1080
1402
|
def resend_email_verification(email)
|
1081
|
-
|
1082
|
-
|
1083
|
-
|
1084
|
-
|
1403
|
+
startAnonymous.uri('/api/user/verify-email')
|
1404
|
+
.url_parameter('email', email)
|
1405
|
+
.put()
|
1406
|
+
.go()
|
1085
1407
|
end
|
1086
1408
|
|
1087
1409
|
#
|
@@ -1092,11 +1414,11 @@ module FusionAuth
|
|
1092
1414
|
# @return [FusionAuth::ClientResponse] The ClientResponse object.
|
1093
1415
|
#
|
1094
1416
|
def resend_registration_verification(email, application_id)
|
1095
|
-
|
1096
|
-
|
1097
|
-
|
1098
|
-
|
1099
|
-
|
1417
|
+
startAnonymous.uri('/api/user/verify-registration')
|
1418
|
+
.url_parameter('email', email)
|
1419
|
+
.url_parameter('applicationId', application_id)
|
1420
|
+
.put()
|
1421
|
+
.go()
|
1100
1422
|
end
|
1101
1423
|
|
1102
1424
|
#
|
@@ -1107,9 +1429,9 @@ module FusionAuth
|
|
1107
1429
|
#
|
1108
1430
|
def retrieve_action(action_id)
|
1109
1431
|
start.uri('/api/user/action')
|
1110
|
-
|
1111
|
-
|
1112
|
-
|
1432
|
+
.url_segment(action_id)
|
1433
|
+
.get()
|
1434
|
+
.go()
|
1113
1435
|
end
|
1114
1436
|
|
1115
1437
|
#
|
@@ -1121,9 +1443,9 @@ module FusionAuth
|
|
1121
1443
|
#
|
1122
1444
|
def retrieve_actions(user_id)
|
1123
1445
|
start.uri('/api/user/action')
|
1124
|
-
|
1125
|
-
|
1126
|
-
|
1446
|
+
.url_parameter('userId', user_id)
|
1447
|
+
.get()
|
1448
|
+
.go()
|
1127
1449
|
end
|
1128
1450
|
|
1129
1451
|
#
|
@@ -1134,10 +1456,10 @@ module FusionAuth
|
|
1134
1456
|
#
|
1135
1457
|
def retrieve_actions_preventing_login(user_id)
|
1136
1458
|
start.uri('/api/user/action')
|
1137
|
-
|
1138
|
-
|
1139
|
-
|
1140
|
-
|
1459
|
+
.url_parameter('userId', user_id)
|
1460
|
+
.url_parameter('preventingLogin', true)
|
1461
|
+
.get()
|
1462
|
+
.go()
|
1141
1463
|
end
|
1142
1464
|
|
1143
1465
|
#
|
@@ -1149,10 +1471,10 @@ module FusionAuth
|
|
1149
1471
|
#
|
1150
1472
|
def retrieve_active_actions(user_id)
|
1151
1473
|
start.uri('/api/user/action')
|
1152
|
-
|
1153
|
-
|
1154
|
-
|
1155
|
-
|
1474
|
+
.url_parameter('userId', user_id)
|
1475
|
+
.url_parameter('active', true)
|
1476
|
+
.get()
|
1477
|
+
.go()
|
1156
1478
|
end
|
1157
1479
|
|
1158
1480
|
#
|
@@ -1163,9 +1485,9 @@ module FusionAuth
|
|
1163
1485
|
#
|
1164
1486
|
def retrieve_application(application_id)
|
1165
1487
|
start.uri('/api/application')
|
1166
|
-
|
1167
|
-
|
1168
|
-
|
1488
|
+
.url_segment(application_id)
|
1489
|
+
.get()
|
1490
|
+
.go()
|
1169
1491
|
end
|
1170
1492
|
|
1171
1493
|
#
|
@@ -1175,8 +1497,8 @@ module FusionAuth
|
|
1175
1497
|
#
|
1176
1498
|
def retrieve_applications()
|
1177
1499
|
start.uri('/api/application')
|
1178
|
-
|
1179
|
-
|
1500
|
+
.get()
|
1501
|
+
.go()
|
1180
1502
|
end
|
1181
1503
|
|
1182
1504
|
#
|
@@ -1187,9 +1509,9 @@ module FusionAuth
|
|
1187
1509
|
#
|
1188
1510
|
def retrieve_audit_log(audit_log_id)
|
1189
1511
|
start.uri('/api/system/audit-log')
|
1190
|
-
|
1191
|
-
|
1192
|
-
|
1512
|
+
.url_segment(audit_log_id)
|
1513
|
+
.get()
|
1514
|
+
.go()
|
1193
1515
|
end
|
1194
1516
|
|
1195
1517
|
#
|
@@ -1200,9 +1522,9 @@ module FusionAuth
|
|
1200
1522
|
#
|
1201
1523
|
def retrieve_consent(consent_id)
|
1202
1524
|
start.uri('/api/consent')
|
1203
|
-
|
1204
|
-
|
1205
|
-
|
1525
|
+
.url_segment(consent_id)
|
1526
|
+
.get()
|
1527
|
+
.go()
|
1206
1528
|
end
|
1207
1529
|
|
1208
1530
|
#
|
@@ -1212,8 +1534,8 @@ module FusionAuth
|
|
1212
1534
|
#
|
1213
1535
|
def retrieve_consents()
|
1214
1536
|
start.uri('/api/consent')
|
1215
|
-
|
1216
|
-
|
1537
|
+
.get()
|
1538
|
+
.go()
|
1217
1539
|
end
|
1218
1540
|
|
1219
1541
|
#
|
@@ -1227,11 +1549,11 @@ module FusionAuth
|
|
1227
1549
|
#
|
1228
1550
|
def retrieve_daily_active_report(application_id, start, _end)
|
1229
1551
|
start.uri('/api/report/daily-active-user')
|
1230
|
-
|
1231
|
-
|
1232
|
-
|
1233
|
-
|
1234
|
-
|
1552
|
+
.url_parameter('applicationId', application_id)
|
1553
|
+
.url_parameter('start', start)
|
1554
|
+
.url_parameter('end', _end)
|
1555
|
+
.get()
|
1556
|
+
.go()
|
1235
1557
|
end
|
1236
1558
|
|
1237
1559
|
#
|
@@ -1242,9 +1564,9 @@ module FusionAuth
|
|
1242
1564
|
#
|
1243
1565
|
def retrieve_email_template(email_template_id)
|
1244
1566
|
start.uri('/api/email/template')
|
1245
|
-
|
1246
|
-
|
1247
|
-
|
1567
|
+
.url_segment(email_template_id)
|
1568
|
+
.get()
|
1569
|
+
.go()
|
1248
1570
|
end
|
1249
1571
|
|
1250
1572
|
#
|
@@ -1257,9 +1579,9 @@ module FusionAuth
|
|
1257
1579
|
#
|
1258
1580
|
def retrieve_email_template_preview(request)
|
1259
1581
|
start.uri('/api/email/template/preview')
|
1260
|
-
|
1261
|
-
|
1262
|
-
|
1582
|
+
.body_handler(FusionAuth::JSONBodyHandler.new(request))
|
1583
|
+
.post()
|
1584
|
+
.go()
|
1263
1585
|
end
|
1264
1586
|
|
1265
1587
|
#
|
@@ -1269,8 +1591,8 @@ module FusionAuth
|
|
1269
1591
|
#
|
1270
1592
|
def retrieve_email_templates()
|
1271
1593
|
start.uri('/api/email/template')
|
1272
|
-
|
1273
|
-
|
1594
|
+
.get()
|
1595
|
+
.go()
|
1274
1596
|
end
|
1275
1597
|
|
1276
1598
|
#
|
@@ -1281,9 +1603,9 @@ module FusionAuth
|
|
1281
1603
|
#
|
1282
1604
|
def retrieve_event_log(event_log_id)
|
1283
1605
|
start.uri('/api/system/event-log')
|
1284
|
-
|
1285
|
-
|
1286
|
-
|
1606
|
+
.url_segment(event_log_id)
|
1607
|
+
.get()
|
1608
|
+
.go()
|
1287
1609
|
end
|
1288
1610
|
|
1289
1611
|
#
|
@@ -1294,9 +1616,9 @@ module FusionAuth
|
|
1294
1616
|
#
|
1295
1617
|
def retrieve_families(user_id)
|
1296
1618
|
start.uri('/api/user/family')
|
1297
|
-
|
1298
|
-
|
1299
|
-
|
1619
|
+
.url_parameter('userId', user_id)
|
1620
|
+
.get()
|
1621
|
+
.go()
|
1300
1622
|
end
|
1301
1623
|
|
1302
1624
|
#
|
@@ -1307,9 +1629,9 @@ module FusionAuth
|
|
1307
1629
|
#
|
1308
1630
|
def retrieve_family_members_by_family_id(family_id)
|
1309
1631
|
start.uri('/api/user/family')
|
1310
|
-
|
1311
|
-
|
1312
|
-
|
1632
|
+
.url_segment(family_id)
|
1633
|
+
.get()
|
1634
|
+
.go()
|
1313
1635
|
end
|
1314
1636
|
|
1315
1637
|
#
|
@@ -1320,9 +1642,9 @@ module FusionAuth
|
|
1320
1642
|
#
|
1321
1643
|
def retrieve_group(group_id)
|
1322
1644
|
start.uri('/api/group')
|
1323
|
-
|
1324
|
-
|
1325
|
-
|
1645
|
+
.url_segment(group_id)
|
1646
|
+
.get()
|
1647
|
+
.go()
|
1326
1648
|
end
|
1327
1649
|
|
1328
1650
|
#
|
@@ -1332,8 +1654,8 @@ module FusionAuth
|
|
1332
1654
|
#
|
1333
1655
|
def retrieve_groups()
|
1334
1656
|
start.uri('/api/group')
|
1335
|
-
|
1336
|
-
|
1657
|
+
.get()
|
1658
|
+
.go()
|
1337
1659
|
end
|
1338
1660
|
|
1339
1661
|
#
|
@@ -1344,9 +1666,9 @@ module FusionAuth
|
|
1344
1666
|
#
|
1345
1667
|
def retrieve_identity_provider(identity_provider_id)
|
1346
1668
|
start.uri('/api/identity-provider')
|
1347
|
-
|
1348
|
-
|
1349
|
-
|
1669
|
+
.url_segment(identity_provider_id)
|
1670
|
+
.get()
|
1671
|
+
.go()
|
1350
1672
|
end
|
1351
1673
|
|
1352
1674
|
#
|
@@ -1356,8 +1678,8 @@ module FusionAuth
|
|
1356
1678
|
#
|
1357
1679
|
def retrieve_identity_providers()
|
1358
1680
|
start.uri('/api/identity-provider')
|
1359
|
-
|
1360
|
-
|
1681
|
+
.get()
|
1682
|
+
.go()
|
1361
1683
|
end
|
1362
1684
|
|
1363
1685
|
#
|
@@ -1369,10 +1691,10 @@ module FusionAuth
|
|
1369
1691
|
#
|
1370
1692
|
def retrieve_inactive_actions(user_id)
|
1371
1693
|
start.uri('/api/user/action')
|
1372
|
-
|
1373
|
-
|
1374
|
-
|
1375
|
-
|
1694
|
+
.url_parameter('userId', user_id)
|
1695
|
+
.url_parameter('active', false)
|
1696
|
+
.get()
|
1697
|
+
.go()
|
1376
1698
|
end
|
1377
1699
|
|
1378
1700
|
#
|
@@ -1382,9 +1704,9 @@ module FusionAuth
|
|
1382
1704
|
#
|
1383
1705
|
def retrieve_inactive_applications()
|
1384
1706
|
start.uri('/api/application')
|
1385
|
-
|
1386
|
-
|
1387
|
-
|
1707
|
+
.url_parameter('inactive', true)
|
1708
|
+
.get()
|
1709
|
+
.go()
|
1388
1710
|
end
|
1389
1711
|
|
1390
1712
|
#
|
@@ -1394,9 +1716,9 @@ module FusionAuth
|
|
1394
1716
|
#
|
1395
1717
|
def retrieve_inactive_user_actions()
|
1396
1718
|
start.uri('/api/user-action')
|
1397
|
-
|
1398
|
-
|
1399
|
-
|
1719
|
+
.url_parameter('inactive', true)
|
1720
|
+
.get()
|
1721
|
+
.go()
|
1400
1722
|
end
|
1401
1723
|
|
1402
1724
|
#
|
@@ -1406,8 +1728,8 @@ module FusionAuth
|
|
1406
1728
|
#
|
1407
1729
|
def retrieve_integration()
|
1408
1730
|
start.uri('/api/integration')
|
1409
|
-
|
1410
|
-
|
1731
|
+
.get()
|
1732
|
+
.go()
|
1411
1733
|
end
|
1412
1734
|
|
1413
1735
|
#
|
@@ -1417,10 +1739,10 @@ module FusionAuth
|
|
1417
1739
|
# @return [FusionAuth::ClientResponse] The ClientResponse object.
|
1418
1740
|
#
|
1419
1741
|
def retrieve_jwt_public_key(key_id)
|
1420
|
-
|
1421
|
-
|
1422
|
-
|
1423
|
-
|
1742
|
+
startAnonymous.uri('/api/jwt/public-key')
|
1743
|
+
.url_parameter('kid', key_id)
|
1744
|
+
.get()
|
1745
|
+
.go()
|
1424
1746
|
end
|
1425
1747
|
|
1426
1748
|
#
|
@@ -1430,10 +1752,10 @@ module FusionAuth
|
|
1430
1752
|
# @return [FusionAuth::ClientResponse] The ClientResponse object.
|
1431
1753
|
#
|
1432
1754
|
def retrieve_jwt_public_key_by_application_id(application_id)
|
1433
|
-
|
1434
|
-
|
1435
|
-
|
1436
|
-
|
1755
|
+
startAnonymous.uri('/api/jwt/public-key')
|
1756
|
+
.url_parameter('applicationId', application_id)
|
1757
|
+
.get()
|
1758
|
+
.go()
|
1437
1759
|
end
|
1438
1760
|
|
1439
1761
|
#
|
@@ -1442,9 +1764,20 @@ module FusionAuth
|
|
1442
1764
|
# @return [FusionAuth::ClientResponse] The ClientResponse object.
|
1443
1765
|
#
|
1444
1766
|
def retrieve_jwt_public_keys()
|
1445
|
-
|
1446
|
-
|
1447
|
-
|
1767
|
+
startAnonymous.uri('/api/jwt/public-key')
|
1768
|
+
.get()
|
1769
|
+
.go()
|
1770
|
+
end
|
1771
|
+
|
1772
|
+
#
|
1773
|
+
# Returns public keys used by FusionAuth to cryptographically verify JWTs using the JSON Web Key format.
|
1774
|
+
#
|
1775
|
+
# @return [FusionAuth::ClientResponse] The ClientResponse object.
|
1776
|
+
#
|
1777
|
+
def retrieve_json_web_key_set()
|
1778
|
+
startAnonymous.uri('/.well-known/jwks.json')
|
1779
|
+
.get()
|
1780
|
+
.go()
|
1448
1781
|
end
|
1449
1782
|
|
1450
1783
|
#
|
@@ -1455,9 +1788,9 @@ module FusionAuth
|
|
1455
1788
|
#
|
1456
1789
|
def retrieve_key(key_id)
|
1457
1790
|
start.uri('/api/key')
|
1458
|
-
|
1459
|
-
|
1460
|
-
|
1791
|
+
.url_segment(key_id)
|
1792
|
+
.get()
|
1793
|
+
.go()
|
1461
1794
|
end
|
1462
1795
|
|
1463
1796
|
#
|
@@ -1467,8 +1800,8 @@ module FusionAuth
|
|
1467
1800
|
#
|
1468
1801
|
def retrieve_keys()
|
1469
1802
|
start.uri('/api/key')
|
1470
|
-
|
1471
|
-
|
1803
|
+
.get()
|
1804
|
+
.go()
|
1472
1805
|
end
|
1473
1806
|
|
1474
1807
|
#
|
@@ -1479,9 +1812,9 @@ module FusionAuth
|
|
1479
1812
|
#
|
1480
1813
|
def retrieve_lambda(lambda_id)
|
1481
1814
|
start.uri('/api/lambda')
|
1482
|
-
|
1483
|
-
|
1484
|
-
|
1815
|
+
.url_segment(lambda_id)
|
1816
|
+
.get()
|
1817
|
+
.go()
|
1485
1818
|
end
|
1486
1819
|
|
1487
1820
|
#
|
@@ -1491,8 +1824,8 @@ module FusionAuth
|
|
1491
1824
|
#
|
1492
1825
|
def retrieve_lambdas()
|
1493
1826
|
start.uri('/api/lambda')
|
1494
|
-
|
1495
|
-
|
1827
|
+
.get()
|
1828
|
+
.go()
|
1496
1829
|
end
|
1497
1830
|
|
1498
1831
|
#
|
@@ -1503,9 +1836,9 @@ module FusionAuth
|
|
1503
1836
|
#
|
1504
1837
|
def retrieve_lambdas_by_type(type)
|
1505
1838
|
start.uri('/api/lambda')
|
1506
|
-
|
1507
|
-
|
1508
|
-
|
1839
|
+
.url_parameter('type', type)
|
1840
|
+
.get()
|
1841
|
+
.go()
|
1509
1842
|
end
|
1510
1843
|
|
1511
1844
|
#
|
@@ -1519,11 +1852,11 @@ module FusionAuth
|
|
1519
1852
|
#
|
1520
1853
|
def retrieve_login_report(application_id, start, _end)
|
1521
1854
|
start.uri('/api/report/login')
|
1522
|
-
|
1523
|
-
|
1524
|
-
|
1525
|
-
|
1526
|
-
|
1855
|
+
.url_parameter('applicationId', application_id)
|
1856
|
+
.url_parameter('start', start)
|
1857
|
+
.url_parameter('end', _end)
|
1858
|
+
.get()
|
1859
|
+
.go()
|
1527
1860
|
end
|
1528
1861
|
|
1529
1862
|
#
|
@@ -1537,11 +1870,11 @@ module FusionAuth
|
|
1537
1870
|
#
|
1538
1871
|
def retrieve_monthly_active_report(application_id, start, _end)
|
1539
1872
|
start.uri('/api/report/monthly-active-user')
|
1540
|
-
|
1541
|
-
|
1542
|
-
|
1543
|
-
|
1544
|
-
|
1873
|
+
.url_parameter('applicationId', application_id)
|
1874
|
+
.url_parameter('start', start)
|
1875
|
+
.url_parameter('end', _end)
|
1876
|
+
.get()
|
1877
|
+
.go()
|
1545
1878
|
end
|
1546
1879
|
|
1547
1880
|
#
|
@@ -1552,10 +1885,21 @@ module FusionAuth
|
|
1552
1885
|
#
|
1553
1886
|
def retrieve_oauth_configuration(application_id)
|
1554
1887
|
start.uri('/api/application')
|
1555
|
-
|
1556
|
-
|
1557
|
-
|
1558
|
-
|
1888
|
+
.url_segment(application_id)
|
1889
|
+
.url_segment("oauth-configuration")
|
1890
|
+
.get()
|
1891
|
+
.go()
|
1892
|
+
end
|
1893
|
+
|
1894
|
+
#
|
1895
|
+
# Returns the well known OpenID Configuration JSON document
|
1896
|
+
#
|
1897
|
+
# @return [FusionAuth::ClientResponse] The ClientResponse object.
|
1898
|
+
#
|
1899
|
+
def retrieve_open_id_configuration()
|
1900
|
+
startAnonymous.uri('/.well-known/openid-configuration')
|
1901
|
+
.get()
|
1902
|
+
.go()
|
1559
1903
|
end
|
1560
1904
|
|
1561
1905
|
#
|
@@ -1567,9 +1911,9 @@ module FusionAuth
|
|
1567
1911
|
# @return [FusionAuth::ClientResponse] The ClientResponse object.
|
1568
1912
|
#
|
1569
1913
|
def retrieve_password_validation_rules()
|
1570
|
-
|
1571
|
-
|
1572
|
-
|
1914
|
+
startAnonymous.uri('/api/tenant/password-validation-rules')
|
1915
|
+
.get()
|
1916
|
+
.go()
|
1573
1917
|
end
|
1574
1918
|
|
1575
1919
|
#
|
@@ -1581,10 +1925,10 @@ module FusionAuth
|
|
1581
1925
|
# @return [FusionAuth::ClientResponse] The ClientResponse object.
|
1582
1926
|
#
|
1583
1927
|
def retrieve_password_validation_rules_with_tenant_id(tenant_id)
|
1584
|
-
|
1585
|
-
|
1586
|
-
|
1587
|
-
|
1928
|
+
startAnonymous.uri('/api/tenant/password-validation-rules')
|
1929
|
+
.url_segment(tenant_id)
|
1930
|
+
.get()
|
1931
|
+
.go()
|
1588
1932
|
end
|
1589
1933
|
|
1590
1934
|
#
|
@@ -1595,9 +1939,9 @@ module FusionAuth
|
|
1595
1939
|
#
|
1596
1940
|
def retrieve_pending_children(parent_email)
|
1597
1941
|
start.uri('/api/user/family/pending')
|
1598
|
-
|
1599
|
-
|
1600
|
-
|
1942
|
+
.url_parameter('parentEmail', parent_email)
|
1943
|
+
.get()
|
1944
|
+
.go()
|
1601
1945
|
end
|
1602
1946
|
|
1603
1947
|
#
|
@@ -1609,10 +1953,10 @@ module FusionAuth
|
|
1609
1953
|
#
|
1610
1954
|
def retrieve_recent_logins(offset, limit)
|
1611
1955
|
start.uri('/api/user/recent-login')
|
1612
|
-
|
1613
|
-
|
1614
|
-
|
1615
|
-
|
1956
|
+
.url_parameter('offset', offset)
|
1957
|
+
.url_parameter('limit', limit)
|
1958
|
+
.get()
|
1959
|
+
.go()
|
1616
1960
|
end
|
1617
1961
|
|
1618
1962
|
#
|
@@ -1623,9 +1967,9 @@ module FusionAuth
|
|
1623
1967
|
#
|
1624
1968
|
def retrieve_refresh_tokens(user_id)
|
1625
1969
|
start.uri('/api/jwt/refresh')
|
1626
|
-
|
1627
|
-
|
1628
|
-
|
1970
|
+
.url_parameter('userId', user_id)
|
1971
|
+
.get()
|
1972
|
+
.go()
|
1629
1973
|
end
|
1630
1974
|
|
1631
1975
|
#
|
@@ -1637,10 +1981,10 @@ module FusionAuth
|
|
1637
1981
|
#
|
1638
1982
|
def retrieve_registration(user_id, application_id)
|
1639
1983
|
start.uri('/api/user/registration')
|
1640
|
-
|
1641
|
-
|
1642
|
-
|
1643
|
-
|
1984
|
+
.url_segment(user_id)
|
1985
|
+
.url_segment(application_id)
|
1986
|
+
.get()
|
1987
|
+
.go()
|
1644
1988
|
end
|
1645
1989
|
|
1646
1990
|
#
|
@@ -1654,11 +1998,11 @@ module FusionAuth
|
|
1654
1998
|
#
|
1655
1999
|
def retrieve_registration_report(application_id, start, _end)
|
1656
2000
|
start.uri('/api/report/registration')
|
1657
|
-
|
1658
|
-
|
1659
|
-
|
1660
|
-
|
1661
|
-
|
2001
|
+
.url_parameter('applicationId', application_id)
|
2002
|
+
.url_parameter('start', start)
|
2003
|
+
.url_parameter('end', _end)
|
2004
|
+
.get()
|
2005
|
+
.go()
|
1662
2006
|
end
|
1663
2007
|
|
1664
2008
|
#
|
@@ -1668,8 +2012,8 @@ module FusionAuth
|
|
1668
2012
|
#
|
1669
2013
|
def retrieve_system_configuration()
|
1670
2014
|
start.uri('/api/system-configuration')
|
1671
|
-
|
1672
|
-
|
2015
|
+
.get()
|
2016
|
+
.go()
|
1673
2017
|
end
|
1674
2018
|
|
1675
2019
|
#
|
@@ -1680,9 +2024,9 @@ module FusionAuth
|
|
1680
2024
|
#
|
1681
2025
|
def retrieve_tenant(tenant_id)
|
1682
2026
|
start.uri('/api/tenant')
|
1683
|
-
|
1684
|
-
|
1685
|
-
|
2027
|
+
.url_segment(tenant_id)
|
2028
|
+
.get()
|
2029
|
+
.go()
|
1686
2030
|
end
|
1687
2031
|
|
1688
2032
|
#
|
@@ -1692,8 +2036,8 @@ module FusionAuth
|
|
1692
2036
|
#
|
1693
2037
|
def retrieve_tenants()
|
1694
2038
|
start.uri('/api/tenant')
|
1695
|
-
|
1696
|
-
|
2039
|
+
.get()
|
2040
|
+
.go()
|
1697
2041
|
end
|
1698
2042
|
|
1699
2043
|
#
|
@@ -1704,9 +2048,9 @@ module FusionAuth
|
|
1704
2048
|
#
|
1705
2049
|
def retrieve_theme(theme_id)
|
1706
2050
|
start.uri('/api/theme')
|
1707
|
-
|
1708
|
-
|
1709
|
-
|
2051
|
+
.url_segment(theme_id)
|
2052
|
+
.get()
|
2053
|
+
.go()
|
1710
2054
|
end
|
1711
2055
|
|
1712
2056
|
#
|
@@ -1716,8 +2060,8 @@ module FusionAuth
|
|
1716
2060
|
#
|
1717
2061
|
def retrieve_themes()
|
1718
2062
|
start.uri('/api/theme')
|
1719
|
-
|
1720
|
-
|
2063
|
+
.get()
|
2064
|
+
.go()
|
1721
2065
|
end
|
1722
2066
|
|
1723
2067
|
#
|
@@ -1728,8 +2072,8 @@ module FusionAuth
|
|
1728
2072
|
#
|
1729
2073
|
def retrieve_total_report()
|
1730
2074
|
start.uri('/api/report/totals')
|
1731
|
-
|
1732
|
-
|
2075
|
+
.get()
|
2076
|
+
.go()
|
1733
2077
|
end
|
1734
2078
|
|
1735
2079
|
#
|
@@ -1740,9 +2084,9 @@ module FusionAuth
|
|
1740
2084
|
#
|
1741
2085
|
def retrieve_user(user_id)
|
1742
2086
|
start.uri('/api/user')
|
1743
|
-
|
1744
|
-
|
1745
|
-
|
2087
|
+
.url_segment(user_id)
|
2088
|
+
.get()
|
2089
|
+
.go()
|
1746
2090
|
end
|
1747
2091
|
|
1748
2092
|
#
|
@@ -1754,9 +2098,9 @@ module FusionAuth
|
|
1754
2098
|
#
|
1755
2099
|
def retrieve_user_action(user_action_id)
|
1756
2100
|
start.uri('/api/user-action')
|
1757
|
-
|
1758
|
-
|
1759
|
-
|
2101
|
+
.url_segment(user_action_id)
|
2102
|
+
.get()
|
2103
|
+
.go()
|
1760
2104
|
end
|
1761
2105
|
|
1762
2106
|
#
|
@@ -1768,9 +2112,9 @@ module FusionAuth
|
|
1768
2112
|
#
|
1769
2113
|
def retrieve_user_action_reason(user_action_reason_id)
|
1770
2114
|
start.uri('/api/user-action-reason')
|
1771
|
-
|
1772
|
-
|
1773
|
-
|
2115
|
+
.url_segment(user_action_reason_id)
|
2116
|
+
.get()
|
2117
|
+
.go()
|
1774
2118
|
end
|
1775
2119
|
|
1776
2120
|
#
|
@@ -1780,8 +2124,8 @@ module FusionAuth
|
|
1780
2124
|
#
|
1781
2125
|
def retrieve_user_action_reasons()
|
1782
2126
|
start.uri('/api/user-action-reason')
|
1783
|
-
|
1784
|
-
|
2127
|
+
.get()
|
2128
|
+
.go()
|
1785
2129
|
end
|
1786
2130
|
|
1787
2131
|
#
|
@@ -1791,8 +2135,8 @@ module FusionAuth
|
|
1791
2135
|
#
|
1792
2136
|
def retrieve_user_actions()
|
1793
2137
|
start.uri('/api/user-action')
|
1794
|
-
|
1795
|
-
|
2138
|
+
.get()
|
2139
|
+
.go()
|
1796
2140
|
end
|
1797
2141
|
|
1798
2142
|
#
|
@@ -1804,9 +2148,9 @@ module FusionAuth
|
|
1804
2148
|
#
|
1805
2149
|
def retrieve_user_by_change_password_id(change_password_id)
|
1806
2150
|
start.uri('/api/user')
|
1807
|
-
|
1808
|
-
|
1809
|
-
|
2151
|
+
.url_parameter('changePasswordId', change_password_id)
|
2152
|
+
.get()
|
2153
|
+
.go()
|
1810
2154
|
end
|
1811
2155
|
|
1812
2156
|
#
|
@@ -1817,9 +2161,9 @@ module FusionAuth
|
|
1817
2161
|
#
|
1818
2162
|
def retrieve_user_by_email(email)
|
1819
2163
|
start.uri('/api/user')
|
1820
|
-
|
1821
|
-
|
1822
|
-
|
2164
|
+
.url_parameter('email', email)
|
2165
|
+
.get()
|
2166
|
+
.go()
|
1823
2167
|
end
|
1824
2168
|
|
1825
2169
|
#
|
@@ -1830,9 +2174,9 @@ module FusionAuth
|
|
1830
2174
|
#
|
1831
2175
|
def retrieve_user_by_login_id(login_id)
|
1832
2176
|
start.uri('/api/user')
|
1833
|
-
|
1834
|
-
|
1835
|
-
|
2177
|
+
.url_parameter('loginId', login_id)
|
2178
|
+
.get()
|
2179
|
+
.go()
|
1836
2180
|
end
|
1837
2181
|
|
1838
2182
|
#
|
@@ -1843,9 +2187,9 @@ module FusionAuth
|
|
1843
2187
|
#
|
1844
2188
|
def retrieve_user_by_username(username)
|
1845
2189
|
start.uri('/api/user')
|
1846
|
-
|
1847
|
-
|
1848
|
-
|
2190
|
+
.url_parameter('username', username)
|
2191
|
+
.get()
|
2192
|
+
.go()
|
1849
2193
|
end
|
1850
2194
|
|
1851
2195
|
#
|
@@ -1857,9 +2201,9 @@ module FusionAuth
|
|
1857
2201
|
#
|
1858
2202
|
def retrieve_user_by_verification_id(verification_id)
|
1859
2203
|
start.uri('/api/user')
|
1860
|
-
|
1861
|
-
|
1862
|
-
|
2204
|
+
.url_parameter('verificationId', verification_id)
|
2205
|
+
.get()
|
2206
|
+
.go()
|
1863
2207
|
end
|
1864
2208
|
|
1865
2209
|
#
|
@@ -1870,9 +2214,9 @@ module FusionAuth
|
|
1870
2214
|
#
|
1871
2215
|
def retrieve_user_comments(user_id)
|
1872
2216
|
start.uri('/api/user/comment')
|
1873
|
-
|
1874
|
-
|
1875
|
-
|
2217
|
+
.url_segment(user_id)
|
2218
|
+
.get()
|
2219
|
+
.go()
|
1876
2220
|
end
|
1877
2221
|
|
1878
2222
|
#
|
@@ -1883,9 +2227,9 @@ module FusionAuth
|
|
1883
2227
|
#
|
1884
2228
|
def retrieve_user_consent(user_consent_id)
|
1885
2229
|
start.uri('/api/user/consent')
|
1886
|
-
|
1887
|
-
|
1888
|
-
|
2230
|
+
.url_segment(user_consent_id)
|
2231
|
+
.get()
|
2232
|
+
.go()
|
1889
2233
|
end
|
1890
2234
|
|
1891
2235
|
#
|
@@ -1896,9 +2240,9 @@ module FusionAuth
|
|
1896
2240
|
#
|
1897
2241
|
def retrieve_user_consents(user_id)
|
1898
2242
|
start.uri('/api/user/consent')
|
1899
|
-
|
1900
|
-
|
1901
|
-
|
2243
|
+
.url_parameter('userId', user_id)
|
2244
|
+
.get()
|
2245
|
+
.go()
|
1902
2246
|
end
|
1903
2247
|
|
1904
2248
|
#
|
@@ -1913,12 +2257,12 @@ module FusionAuth
|
|
1913
2257
|
#
|
1914
2258
|
def retrieve_user_login_report(application_id, user_id, start, _end)
|
1915
2259
|
start.uri('/api/report/login')
|
1916
|
-
|
1917
|
-
|
1918
|
-
|
1919
|
-
|
1920
|
-
|
1921
|
-
|
2260
|
+
.url_parameter('applicationId', application_id)
|
2261
|
+
.url_parameter('userId', user_id)
|
2262
|
+
.url_parameter('start', start)
|
2263
|
+
.url_parameter('end', _end)
|
2264
|
+
.get()
|
2265
|
+
.go()
|
1922
2266
|
end
|
1923
2267
|
|
1924
2268
|
#
|
@@ -1933,12 +2277,12 @@ module FusionAuth
|
|
1933
2277
|
#
|
1934
2278
|
def retrieve_user_login_report_by_login_id(application_id, login_id, start, _end)
|
1935
2279
|
start.uri('/api/report/login')
|
1936
|
-
|
1937
|
-
|
1938
|
-
|
1939
|
-
|
1940
|
-
|
1941
|
-
|
2280
|
+
.url_parameter('applicationId', application_id)
|
2281
|
+
.url_parameter('loginId', login_id)
|
2282
|
+
.url_parameter('start', start)
|
2283
|
+
.url_parameter('end', _end)
|
2284
|
+
.get()
|
2285
|
+
.go()
|
1942
2286
|
end
|
1943
2287
|
|
1944
2288
|
#
|
@@ -1951,11 +2295,11 @@ module FusionAuth
|
|
1951
2295
|
#
|
1952
2296
|
def retrieve_user_recent_logins(user_id, offset, limit)
|
1953
2297
|
start.uri('/api/user/recent-login')
|
1954
|
-
|
1955
|
-
|
1956
|
-
|
1957
|
-
|
1958
|
-
|
2298
|
+
.url_parameter('userId', user_id)
|
2299
|
+
.url_parameter('offset', offset)
|
2300
|
+
.url_parameter('limit', limit)
|
2301
|
+
.get()
|
2302
|
+
.go()
|
1959
2303
|
end
|
1960
2304
|
|
1961
2305
|
#
|
@@ -1965,10 +2309,10 @@ module FusionAuth
|
|
1965
2309
|
# @return [FusionAuth::ClientResponse] The ClientResponse object.
|
1966
2310
|
#
|
1967
2311
|
def retrieve_user_using_jwt(encoded_jwt)
|
1968
|
-
|
1969
|
-
|
1970
|
-
|
1971
|
-
|
2312
|
+
startAnonymous.uri('/api/user')
|
2313
|
+
.authorization('JWT ' + encoded_jwt)
|
2314
|
+
.get()
|
2315
|
+
.go()
|
1972
2316
|
end
|
1973
2317
|
|
1974
2318
|
#
|
@@ -1979,9 +2323,9 @@ module FusionAuth
|
|
1979
2323
|
#
|
1980
2324
|
def retrieve_webhook(webhook_id)
|
1981
2325
|
start.uri('/api/webhook')
|
1982
|
-
|
1983
|
-
|
1984
|
-
|
2326
|
+
.url_segment(webhook_id)
|
2327
|
+
.get()
|
2328
|
+
.go()
|
1985
2329
|
end
|
1986
2330
|
|
1987
2331
|
#
|
@@ -1991,8 +2335,8 @@ module FusionAuth
|
|
1991
2335
|
#
|
1992
2336
|
def retrieve_webhooks()
|
1993
2337
|
start.uri('/api/webhook')
|
1994
|
-
|
1995
|
-
|
2338
|
+
.get()
|
2339
|
+
.go()
|
1996
2340
|
end
|
1997
2341
|
|
1998
2342
|
#
|
@@ -2006,11 +2350,11 @@ module FusionAuth
|
|
2006
2350
|
#
|
2007
2351
|
def revoke_refresh_token(token, user_id, application_id)
|
2008
2352
|
start.uri('/api/jwt/refresh')
|
2009
|
-
|
2010
|
-
|
2011
|
-
|
2012
|
-
|
2013
|
-
|
2353
|
+
.url_parameter('token', token)
|
2354
|
+
.url_parameter('userId', user_id)
|
2355
|
+
.url_parameter('applicationId', application_id)
|
2356
|
+
.delete()
|
2357
|
+
.go()
|
2014
2358
|
end
|
2015
2359
|
|
2016
2360
|
#
|
@@ -2021,9 +2365,9 @@ module FusionAuth
|
|
2021
2365
|
#
|
2022
2366
|
def revoke_user_consent(user_consent_id)
|
2023
2367
|
start.uri('/api/user/consent')
|
2024
|
-
|
2025
|
-
|
2026
|
-
|
2368
|
+
.url_segment(user_consent_id)
|
2369
|
+
.delete()
|
2370
|
+
.go()
|
2027
2371
|
end
|
2028
2372
|
|
2029
2373
|
#
|
@@ -2034,9 +2378,9 @@ module FusionAuth
|
|
2034
2378
|
#
|
2035
2379
|
def search_audit_logs(request)
|
2036
2380
|
start.uri('/api/system/audit-log/search')
|
2037
|
-
|
2038
|
-
|
2039
|
-
|
2381
|
+
.body_handler(FusionAuth::JSONBodyHandler.new(request))
|
2382
|
+
.post()
|
2383
|
+
.go()
|
2040
2384
|
end
|
2041
2385
|
|
2042
2386
|
#
|
@@ -2047,9 +2391,9 @@ module FusionAuth
|
|
2047
2391
|
#
|
2048
2392
|
def search_event_logs(request)
|
2049
2393
|
start.uri('/api/system/event-log/search')
|
2050
|
-
|
2051
|
-
|
2052
|
-
|
2394
|
+
.body_handler(FusionAuth::JSONBodyHandler.new(request))
|
2395
|
+
.post()
|
2396
|
+
.go()
|
2053
2397
|
end
|
2054
2398
|
|
2055
2399
|
#
|
@@ -2060,9 +2404,9 @@ module FusionAuth
|
|
2060
2404
|
#
|
2061
2405
|
def search_login_records(request)
|
2062
2406
|
start.uri('/api/system/login-record/search')
|
2063
|
-
|
2064
|
-
|
2065
|
-
|
2407
|
+
.body_handler(FusionAuth::JSONBodyHandler.new(request))
|
2408
|
+
.post()
|
2409
|
+
.go()
|
2066
2410
|
end
|
2067
2411
|
|
2068
2412
|
#
|
@@ -2073,9 +2417,9 @@ module FusionAuth
|
|
2073
2417
|
#
|
2074
2418
|
def search_users(ids)
|
2075
2419
|
start.uri('/api/user/search')
|
2076
|
-
|
2077
|
-
|
2078
|
-
|
2420
|
+
.url_parameter('ids', ids)
|
2421
|
+
.get()
|
2422
|
+
.go()
|
2079
2423
|
end
|
2080
2424
|
|
2081
2425
|
#
|
@@ -2087,9 +2431,9 @@ module FusionAuth
|
|
2087
2431
|
#
|
2088
2432
|
def search_users_by_query_string(request)
|
2089
2433
|
start.uri('/api/user/search')
|
2090
|
-
|
2091
|
-
|
2092
|
-
|
2434
|
+
.body_handler(FusionAuth::JSONBodyHandler.new(request))
|
2435
|
+
.post()
|
2436
|
+
.go()
|
2093
2437
|
end
|
2094
2438
|
|
2095
2439
|
#
|
@@ -2102,10 +2446,10 @@ module FusionAuth
|
|
2102
2446
|
#
|
2103
2447
|
def send_email(email_template_id, request)
|
2104
2448
|
start.uri('/api/email/send')
|
2105
|
-
|
2106
|
-
|
2107
|
-
|
2108
|
-
|
2449
|
+
.url_segment(email_template_id)
|
2450
|
+
.body_handler(FusionAuth::JSONBodyHandler.new(request))
|
2451
|
+
.post()
|
2452
|
+
.go()
|
2109
2453
|
end
|
2110
2454
|
|
2111
2455
|
#
|
@@ -2116,9 +2460,9 @@ module FusionAuth
|
|
2116
2460
|
#
|
2117
2461
|
def send_family_request_email(request)
|
2118
2462
|
start.uri('/api/user/family/request')
|
2119
|
-
|
2120
|
-
|
2121
|
-
|
2463
|
+
.body_handler(FusionAuth::JSONBodyHandler.new(request))
|
2464
|
+
.post()
|
2465
|
+
.go()
|
2122
2466
|
end
|
2123
2467
|
|
2124
2468
|
#
|
@@ -2128,10 +2472,10 @@ module FusionAuth
|
|
2128
2472
|
# @return [FusionAuth::ClientResponse] The ClientResponse object.
|
2129
2473
|
#
|
2130
2474
|
def send_passwordless_code(request)
|
2131
|
-
|
2132
|
-
|
2133
|
-
|
2134
|
-
|
2475
|
+
startAnonymous.uri('/api/passwordless/send')
|
2476
|
+
.body_handler(FusionAuth::JSONBodyHandler.new(request))
|
2477
|
+
.post()
|
2478
|
+
.go()
|
2135
2479
|
end
|
2136
2480
|
|
2137
2481
|
#
|
@@ -2142,9 +2486,9 @@ module FusionAuth
|
|
2142
2486
|
#
|
2143
2487
|
def send_two_factor_code(request)
|
2144
2488
|
start.uri('/api/two-factor/send')
|
2145
|
-
|
2146
|
-
|
2147
|
-
|
2489
|
+
.body_handler(FusionAuth::JSONBodyHandler.new(request))
|
2490
|
+
.post()
|
2491
|
+
.go()
|
2148
2492
|
end
|
2149
2493
|
|
2150
2494
|
#
|
@@ -2154,10 +2498,24 @@ module FusionAuth
|
|
2154
2498
|
# @return [FusionAuth::ClientResponse] The ClientResponse object.
|
2155
2499
|
#
|
2156
2500
|
def send_two_factor_code_for_login(two_factor_id)
|
2157
|
-
|
2158
|
-
|
2159
|
-
|
2160
|
-
|
2501
|
+
startAnonymous.uri('/api/two-factor/send')
|
2502
|
+
.url_segment(two_factor_id)
|
2503
|
+
.post()
|
2504
|
+
.go()
|
2505
|
+
end
|
2506
|
+
|
2507
|
+
#
|
2508
|
+
# Begins a login request for a 3rd party login that requires user interaction such as HYPR.
|
2509
|
+
#
|
2510
|
+
# @param request [OpenStruct, Hash] The third-party login request that contains information from the third-party login
|
2511
|
+
# providers that FusionAuth uses to reconcile the user's account.
|
2512
|
+
# @return [FusionAuth::ClientResponse] The ClientResponse object.
|
2513
|
+
#
|
2514
|
+
def start_identity_provider_login(request)
|
2515
|
+
start.uri('/api/identity-provider/start')
|
2516
|
+
.body_handler(FusionAuth::JSONBodyHandler.new(request))
|
2517
|
+
.post()
|
2518
|
+
.go()
|
2161
2519
|
end
|
2162
2520
|
|
2163
2521
|
#
|
@@ -2169,9 +2527,9 @@ module FusionAuth
|
|
2169
2527
|
#
|
2170
2528
|
def start_passwordless_login(request)
|
2171
2529
|
start.uri('/api/passwordless/start')
|
2172
|
-
|
2173
|
-
|
2174
|
-
|
2530
|
+
.body_handler(FusionAuth::JSONBodyHandler.new(request))
|
2531
|
+
.post()
|
2532
|
+
.go()
|
2175
2533
|
end
|
2176
2534
|
|
2177
2535
|
#
|
@@ -2181,10 +2539,10 @@ module FusionAuth
|
|
2181
2539
|
# @return [FusionAuth::ClientResponse] The ClientResponse object.
|
2182
2540
|
#
|
2183
2541
|
def two_factor_login(request)
|
2184
|
-
|
2185
|
-
|
2186
|
-
|
2187
|
-
|
2542
|
+
startAnonymous.uri('/api/two-factor/login')
|
2543
|
+
.body_handler(FusionAuth::JSONBodyHandler.new(request))
|
2544
|
+
.post()
|
2545
|
+
.go()
|
2188
2546
|
end
|
2189
2547
|
|
2190
2548
|
#
|
@@ -2196,10 +2554,10 @@ module FusionAuth
|
|
2196
2554
|
#
|
2197
2555
|
def update_application(application_id, request)
|
2198
2556
|
start.uri('/api/application')
|
2199
|
-
|
2200
|
-
|
2201
|
-
|
2202
|
-
|
2557
|
+
.url_segment(application_id)
|
2558
|
+
.body_handler(FusionAuth::JSONBodyHandler.new(request))
|
2559
|
+
.put()
|
2560
|
+
.go()
|
2203
2561
|
end
|
2204
2562
|
|
2205
2563
|
#
|
@@ -2212,12 +2570,12 @@ module FusionAuth
|
|
2212
2570
|
#
|
2213
2571
|
def update_application_role(application_id, role_id, request)
|
2214
2572
|
start.uri('/api/application')
|
2215
|
-
|
2216
|
-
|
2217
|
-
|
2218
|
-
|
2219
|
-
|
2220
|
-
|
2573
|
+
.url_segment(application_id)
|
2574
|
+
.url_segment("role")
|
2575
|
+
.url_segment(role_id)
|
2576
|
+
.body_handler(FusionAuth::JSONBodyHandler.new(request))
|
2577
|
+
.put()
|
2578
|
+
.go()
|
2221
2579
|
end
|
2222
2580
|
|
2223
2581
|
#
|
@@ -2229,10 +2587,10 @@ module FusionAuth
|
|
2229
2587
|
#
|
2230
2588
|
def update_consent(consent_id, request)
|
2231
2589
|
start.uri('/api/consent')
|
2232
|
-
|
2233
|
-
|
2234
|
-
|
2235
|
-
|
2590
|
+
.url_segment(consent_id)
|
2591
|
+
.body_handler(FusionAuth::JSONBodyHandler.new(request))
|
2592
|
+
.put()
|
2593
|
+
.go()
|
2236
2594
|
end
|
2237
2595
|
|
2238
2596
|
#
|
@@ -2244,10 +2602,10 @@ module FusionAuth
|
|
2244
2602
|
#
|
2245
2603
|
def update_email_template(email_template_id, request)
|
2246
2604
|
start.uri('/api/email/template')
|
2247
|
-
|
2248
|
-
|
2249
|
-
|
2250
|
-
|
2605
|
+
.url_segment(email_template_id)
|
2606
|
+
.body_handler(FusionAuth::JSONBodyHandler.new(request))
|
2607
|
+
.put()
|
2608
|
+
.go()
|
2251
2609
|
end
|
2252
2610
|
|
2253
2611
|
#
|
@@ -2259,10 +2617,10 @@ module FusionAuth
|
|
2259
2617
|
#
|
2260
2618
|
def update_group(group_id, request)
|
2261
2619
|
start.uri('/api/group')
|
2262
|
-
|
2263
|
-
|
2264
|
-
|
2265
|
-
|
2620
|
+
.url_segment(group_id)
|
2621
|
+
.body_handler(FusionAuth::JSONBodyHandler.new(request))
|
2622
|
+
.put()
|
2623
|
+
.go()
|
2266
2624
|
end
|
2267
2625
|
|
2268
2626
|
#
|
@@ -2274,10 +2632,10 @@ module FusionAuth
|
|
2274
2632
|
#
|
2275
2633
|
def update_identity_provider(identity_provider_id, request)
|
2276
2634
|
start.uri('/api/identity-provider')
|
2277
|
-
|
2278
|
-
|
2279
|
-
|
2280
|
-
|
2635
|
+
.url_segment(identity_provider_id)
|
2636
|
+
.body_handler(FusionAuth::JSONBodyHandler.new(request))
|
2637
|
+
.put()
|
2638
|
+
.go()
|
2281
2639
|
end
|
2282
2640
|
|
2283
2641
|
#
|
@@ -2288,9 +2646,9 @@ module FusionAuth
|
|
2288
2646
|
#
|
2289
2647
|
def update_integrations(request)
|
2290
2648
|
start.uri('/api/integration')
|
2291
|
-
|
2292
|
-
|
2293
|
-
|
2649
|
+
.body_handler(FusionAuth::JSONBodyHandler.new(request))
|
2650
|
+
.put()
|
2651
|
+
.go()
|
2294
2652
|
end
|
2295
2653
|
|
2296
2654
|
#
|
@@ -2302,10 +2660,10 @@ module FusionAuth
|
|
2302
2660
|
#
|
2303
2661
|
def update_key(key_id, request)
|
2304
2662
|
start.uri('/api/key')
|
2305
|
-
|
2306
|
-
|
2307
|
-
|
2308
|
-
|
2663
|
+
.url_segment(key_id)
|
2664
|
+
.body_handler(FusionAuth::JSONBodyHandler.new(request))
|
2665
|
+
.put()
|
2666
|
+
.go()
|
2309
2667
|
end
|
2310
2668
|
|
2311
2669
|
#
|
@@ -2317,10 +2675,10 @@ module FusionAuth
|
|
2317
2675
|
#
|
2318
2676
|
def update_lambda(lambda_id, request)
|
2319
2677
|
start.uri('/api/lambda')
|
2320
|
-
|
2321
|
-
|
2322
|
-
|
2323
|
-
|
2678
|
+
.url_segment(lambda_id)
|
2679
|
+
.body_handler(FusionAuth::JSONBodyHandler.new(request))
|
2680
|
+
.put()
|
2681
|
+
.go()
|
2324
2682
|
end
|
2325
2683
|
|
2326
2684
|
#
|
@@ -2332,10 +2690,10 @@ module FusionAuth
|
|
2332
2690
|
#
|
2333
2691
|
def update_registration(user_id, request)
|
2334
2692
|
start.uri('/api/user/registration')
|
2335
|
-
|
2336
|
-
|
2337
|
-
|
2338
|
-
|
2693
|
+
.url_segment(user_id)
|
2694
|
+
.body_handler(FusionAuth::JSONBodyHandler.new(request))
|
2695
|
+
.put()
|
2696
|
+
.go()
|
2339
2697
|
end
|
2340
2698
|
|
2341
2699
|
#
|
@@ -2346,9 +2704,9 @@ module FusionAuth
|
|
2346
2704
|
#
|
2347
2705
|
def update_system_configuration(request)
|
2348
2706
|
start.uri('/api/system-configuration')
|
2349
|
-
|
2350
|
-
|
2351
|
-
|
2707
|
+
.body_handler(FusionAuth::JSONBodyHandler.new(request))
|
2708
|
+
.put()
|
2709
|
+
.go()
|
2352
2710
|
end
|
2353
2711
|
|
2354
2712
|
#
|
@@ -2360,10 +2718,10 @@ module FusionAuth
|
|
2360
2718
|
#
|
2361
2719
|
def update_tenant(tenant_id, request)
|
2362
2720
|
start.uri('/api/tenant')
|
2363
|
-
|
2364
|
-
|
2365
|
-
|
2366
|
-
|
2721
|
+
.url_segment(tenant_id)
|
2722
|
+
.body_handler(FusionAuth::JSONBodyHandler.new(request))
|
2723
|
+
.put()
|
2724
|
+
.go()
|
2367
2725
|
end
|
2368
2726
|
|
2369
2727
|
#
|
@@ -2375,10 +2733,10 @@ module FusionAuth
|
|
2375
2733
|
#
|
2376
2734
|
def update_theme(theme_id, request)
|
2377
2735
|
start.uri('/api/theme')
|
2378
|
-
|
2379
|
-
|
2380
|
-
|
2381
|
-
|
2736
|
+
.url_segment(theme_id)
|
2737
|
+
.body_handler(FusionAuth::JSONBodyHandler.new(request))
|
2738
|
+
.put()
|
2739
|
+
.go()
|
2382
2740
|
end
|
2383
2741
|
|
2384
2742
|
#
|
@@ -2390,10 +2748,10 @@ module FusionAuth
|
|
2390
2748
|
#
|
2391
2749
|
def update_user(user_id, request)
|
2392
2750
|
start.uri('/api/user')
|
2393
|
-
|
2394
|
-
|
2395
|
-
|
2396
|
-
|
2751
|
+
.url_segment(user_id)
|
2752
|
+
.body_handler(FusionAuth::JSONBodyHandler.new(request))
|
2753
|
+
.put()
|
2754
|
+
.go()
|
2397
2755
|
end
|
2398
2756
|
|
2399
2757
|
#
|
@@ -2405,10 +2763,10 @@ module FusionAuth
|
|
2405
2763
|
#
|
2406
2764
|
def update_user_action(user_action_id, request)
|
2407
2765
|
start.uri('/api/user-action')
|
2408
|
-
|
2409
|
-
|
2410
|
-
|
2411
|
-
|
2766
|
+
.url_segment(user_action_id)
|
2767
|
+
.body_handler(FusionAuth::JSONBodyHandler.new(request))
|
2768
|
+
.put()
|
2769
|
+
.go()
|
2412
2770
|
end
|
2413
2771
|
|
2414
2772
|
#
|
@@ -2420,10 +2778,10 @@ module FusionAuth
|
|
2420
2778
|
#
|
2421
2779
|
def update_user_action_reason(user_action_reason_id, request)
|
2422
2780
|
start.uri('/api/user-action-reason')
|
2423
|
-
|
2424
|
-
|
2425
|
-
|
2426
|
-
|
2781
|
+
.url_segment(user_action_reason_id)
|
2782
|
+
.body_handler(FusionAuth::JSONBodyHandler.new(request))
|
2783
|
+
.put()
|
2784
|
+
.go()
|
2427
2785
|
end
|
2428
2786
|
|
2429
2787
|
#
|
@@ -2435,10 +2793,10 @@ module FusionAuth
|
|
2435
2793
|
#
|
2436
2794
|
def update_user_consent(user_consent_id, request)
|
2437
2795
|
start.uri('/api/user/consent')
|
2438
|
-
|
2439
|
-
|
2440
|
-
|
2441
|
-
|
2796
|
+
.url_segment(user_consent_id)
|
2797
|
+
.body_handler(FusionAuth::JSONBodyHandler.new(request))
|
2798
|
+
.put()
|
2799
|
+
.go()
|
2442
2800
|
end
|
2443
2801
|
|
2444
2802
|
#
|
@@ -2450,10 +2808,26 @@ module FusionAuth
|
|
2450
2808
|
#
|
2451
2809
|
def update_webhook(webhook_id, request)
|
2452
2810
|
start.uri('/api/webhook')
|
2453
|
-
|
2454
|
-
|
2455
|
-
|
2456
|
-
|
2811
|
+
.url_segment(webhook_id)
|
2812
|
+
.body_handler(FusionAuth::JSONBodyHandler.new(request))
|
2813
|
+
.put()
|
2814
|
+
.go()
|
2815
|
+
end
|
2816
|
+
|
2817
|
+
#
|
2818
|
+
# Validates the end-user provided user_code from the user-interaction of the Device Authorization Grant.
|
2819
|
+
# If you build your own activation form you should validate the user provided code prior to beginning the Authorization grant.
|
2820
|
+
#
|
2821
|
+
# @param user_code [string] The end-user verification code.
|
2822
|
+
# @param client_id [string] The client id.
|
2823
|
+
# @return [FusionAuth::ClientResponse] The ClientResponse object.
|
2824
|
+
#
|
2825
|
+
def validate_device(user_code, client_id)
|
2826
|
+
startAnonymous.uri('/oauth2/device/validate')
|
2827
|
+
.url_parameter('user_code', user_code)
|
2828
|
+
.url_parameter('client_id', client_id)
|
2829
|
+
.get()
|
2830
|
+
.go()
|
2457
2831
|
end
|
2458
2832
|
|
2459
2833
|
#
|
@@ -2466,10 +2840,10 @@ module FusionAuth
|
|
2466
2840
|
# @return [FusionAuth::ClientResponse] The ClientResponse object.
|
2467
2841
|
#
|
2468
2842
|
def validate_jwt(encoded_jwt)
|
2469
|
-
|
2470
|
-
|
2471
|
-
|
2472
|
-
|
2843
|
+
startAnonymous.uri('/api/jwt/validate')
|
2844
|
+
.authorization('JWT ' + encoded_jwt)
|
2845
|
+
.get()
|
2846
|
+
.go()
|
2473
2847
|
end
|
2474
2848
|
|
2475
2849
|
#
|
@@ -2479,10 +2853,10 @@ module FusionAuth
|
|
2479
2853
|
# @return [FusionAuth::ClientResponse] The ClientResponse object.
|
2480
2854
|
#
|
2481
2855
|
def verify_email(verification_id)
|
2482
|
-
|
2483
|
-
|
2484
|
-
|
2485
|
-
|
2856
|
+
startAnonymous.uri('/api/user/verify-email')
|
2857
|
+
.url_segment(verification_id)
|
2858
|
+
.post()
|
2859
|
+
.go()
|
2486
2860
|
end
|
2487
2861
|
|
2488
2862
|
#
|
@@ -2492,10 +2866,10 @@ module FusionAuth
|
|
2492
2866
|
# @return [FusionAuth::ClientResponse] The ClientResponse object.
|
2493
2867
|
#
|
2494
2868
|
def verify_registration(verification_id)
|
2495
|
-
|
2496
|
-
|
2497
|
-
|
2498
|
-
|
2869
|
+
startAnonymous.uri('/api/user/verify-registration')
|
2870
|
+
.url_segment(verification_id)
|
2871
|
+
.post()
|
2872
|
+
.go()
|
2499
2873
|
end
|
2500
2874
|
|
2501
2875
|
#
|
@@ -2505,13 +2879,22 @@ module FusionAuth
|
|
2505
2879
|
#
|
2506
2880
|
private
|
2507
2881
|
def start
|
2508
|
-
|
2509
|
-
|
2510
|
-
|
2511
|
-
|
2512
|
-
|
2513
|
-
|
2514
|
-
|
2882
|
+
client = startAnonymous.authorization(@api_key)
|
2883
|
+
client
|
2884
|
+
end
|
2885
|
+
|
2886
|
+
private
|
2887
|
+
def startAnonymous
|
2888
|
+
client = RESTClient.new
|
2889
|
+
.success_response_handler(FusionAuth::JSONResponseHandler.new(OpenStruct))
|
2890
|
+
.error_response_handler(FusionAuth::JSONResponseHandler.new(OpenStruct))
|
2891
|
+
.url(@base_url)
|
2892
|
+
.connect_timeout(@connect_timeout)
|
2893
|
+
.read_timeout(@read_timeout)
|
2894
|
+
if @tenant_id != nil
|
2895
|
+
client.header("X-FusionAuth-TenantId", @tenant_id)
|
2896
|
+
end
|
2897
|
+
client
|
2515
2898
|
end
|
2516
2899
|
end
|
2517
2900
|
end
|