fusionauth_client 1.25.0 → 1.28.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 61ebe66291227393968cfd972f5668175aca99e0780bc45f5b69b17b99524a82
4
- data.tar.gz: 5579794527c8a3dfa909779b714cfe76c6f95e4561c8a01801d7b91595e45f47
3
+ metadata.gz: ba0a948430d381623a2284f06d8fab72d1a6547475df8b1a7f19208e785fc72f
4
+ data.tar.gz: 5c848be1487fc76c2bd45bb5982204a1d38305b40547f40203f099ed352e2b4d
5
5
  SHA512:
6
- metadata.gz: f925ced42b1e203af544a548260e120c944fede38dcaf9d785d5c59ee0ed7f3093044a8662136618e2c44d3e5815ba1be815a11c117d1b5e8b6bd4ef1b88d8a3
7
- data.tar.gz: a120d54a3319323474804b9514198dd05bf459c5eca9ffbffb57d710dfd7e3cfa98e99e457d7b306d4d27aac8e6131e2c5b24b9d65de4a1eff3c7c8d797fd35c
6
+ metadata.gz: 2e4efd2ed79453f1ec5137abe1b030ac90e45b5c8975139cc1f527fcb3b307eca88bde3d6a83ac81718dff160085ce99a3a108b38dfc02d4cd1c5ee26aa212c7
7
+ data.tar.gz: 8e8b75dc51af13f096e7606463a1cf0effe265c866de3656a3df68e674b880c9de9185e4d06281272c43dfa71e9539ebdf2d861ca3e4610ee58da0c943c39fd4
data/.gitignore CHANGED
@@ -1,6 +1,5 @@
1
1
  /.bundle/
2
2
  /.yardoc
3
- /Gemfile.lock
4
3
  /_yardoc/
5
4
  /coverage/
6
5
  /doc/
data/Gemfile.lock ADDED
@@ -0,0 +1,27 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ fusionauth_client (1.28.0)
5
+
6
+ GEM
7
+ remote: https://rubygems.org/
8
+ specs:
9
+ minitest (5.8.3)
10
+ rake (12.3.3)
11
+
12
+ PLATFORMS
13
+ ruby
14
+ x86_64-darwin-19
15
+ x86_64-darwin-20
16
+ x86_64-linux
17
+
18
+ DEPENDENCIES
19
+ fusionauth_client!
20
+ minitest (= 5.8.3)
21
+ rake (= 12.3.3)
22
+
23
+ RUBY VERSION
24
+ ruby 2.5.1p57
25
+
26
+ BUNDLED WITH
27
+ 2.2.5
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.25.0", licenses: ["ApacheV2_0"]) {
19
+ project(group: "io.fusionauth", name: "fusionauth-ruby-client", version: "1.28.0", licenses: ["ApacheV2_0"]) {
20
20
  workflow {
21
21
  standard()
22
22
  }
@@ -16,16 +16,16 @@
16
16
  <option name="myRootTask">
17
17
  <RakeTaskImpl id="rake">
18
18
  <subtasks>
19
- <RakeTaskImpl description="Build fusionauth_client-1.24.1.gem into the pkg directory" fullCommand="build" id="build" />
19
+ <RakeTaskImpl description="Build fusionauth_client-1.26.0.gem into the pkg directory" fullCommand="build" id="build" />
20
20
  <RakeTaskImpl description="Remove any temporary products" fullCommand="clean" id="clean" />
21
21
  <RakeTaskImpl description="Remove any generated files" fullCommand="clobber" id="clobber" />
22
- <RakeTaskImpl description="Build and install fusionauth_client-1.24.1.gem into system gems" fullCommand="install" id="install" />
22
+ <RakeTaskImpl description="Build and install fusionauth_client-1.26.0.gem into system gems" fullCommand="install" id="install" />
23
23
  <RakeTaskImpl id="install">
24
24
  <subtasks>
25
- <RakeTaskImpl description="Build and install fusionauth_client-1.24.1.gem into system gems without network access" fullCommand="install:local" id="local" />
25
+ <RakeTaskImpl description="Build and install fusionauth_client-1.26.0.gem into system gems without network access" fullCommand="install:local" id="local" />
26
26
  </subtasks>
27
27
  </RakeTaskImpl>
28
- <RakeTaskImpl description="Create tag v1.24.1 and build and push fusionauth_client-1.24.1.gem to https://rubygems.org" fullCommand="release[remote]" id="release[remote]" />
28
+ <RakeTaskImpl description="Create tag v1.26.0 and build and push fusionauth_client-1.26.0.gem to https://rubygems.org" fullCommand="release[remote]" id="release[remote]" />
29
29
  <RakeTaskImpl description="Run tests" fullCommand="test" id="test" />
30
30
  <RakeTaskImpl description="" fullCommand="default" id="default" />
31
31
  <RakeTaskImpl description="" fullCommand="release" id="release" />
@@ -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.25.0'
7
+ spec.version = '1.28.0'
8
8
  spec.authors = ['Brian Pontarelli', 'Daniel DeGroff']
9
9
  spec.email = %w(brian@fusionauth.io daniel@fusionauth.io)
10
10
 
@@ -55,6 +55,18 @@ module FusionAuth
55
55
  .go()
56
56
  end
57
57
 
58
+ #
59
+ # Activates the FusionAuth Reactor using a license id and optionally a license text (for air-gapped deployments)
60
+ #
61
+ # @param request [OpenStruct, Hash] An optional request that contains the license text to activate Reactor (useful for air-gap deployments of FusionAuth).
62
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
63
+ def activate_reactor(request)
64
+ start.uri('/api/reactor')
65
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
66
+ .post()
67
+ .go()
68
+ end
69
+
58
70
  #
59
71
  # Adds a user to an existing family. The family id must be specified.
60
72
  #
@@ -91,7 +103,7 @@ module FusionAuth
91
103
  # @param request [OpenStruct, Hash] The change password request that contains all of the information used to change the password.
92
104
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
93
105
  def change_password(change_password_id, request)
94
- start.uri('/api/user/change-password')
106
+ startAnonymous.uri('/api/user/change-password')
95
107
  .url_segment(change_password_id)
96
108
  .body_handler(FusionAuth::JSONBodyHandler.new(request))
97
109
  .post()
@@ -124,6 +136,24 @@ module FusionAuth
124
136
  .go()
125
137
  end
126
138
 
139
+ #
140
+ # Creates an API key. You can optionally specify a unique Id for the key, if not provided one will be generated.
141
+ # an API key can only be created with equal or lesser authority. An API key cannot create another API key unless it is granted
142
+ # to that API key.
143
+ #
144
+ # If an API key is locked to a tenant, it can only create API Keys for that same tenant.
145
+ #
146
+ # @param key_id [string] (Optional) The unique Id of the API key. If not provided a secure random Id will be generated.
147
+ # @param request [OpenStruct, Hash] The request object that contains all of the information needed to create the APIKey.
148
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
149
+ def create_api_key(key_id, request)
150
+ start.uri('/api/api-key')
151
+ .url_segment(key_id)
152
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
153
+ .post()
154
+ .go()
155
+ end
156
+
127
157
  #
128
158
  # Creates an application. You can optionally specify an Id for the application, if not provided one will be generated.
129
159
  #
@@ -212,6 +242,52 @@ module FusionAuth
212
242
  .go()
213
243
  end
214
244
 
245
+ #
246
+ # Creates an Entity. You can optionally specify an Id for the Entity. If not provided one will be generated.
247
+ #
248
+ # @param entity_id [string] (Optional) The Id for the Entity. If not provided a secure random UUID will be generated.
249
+ # @param request [OpenStruct, Hash] The request object that contains all of the information used to create the Entity.
250
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
251
+ def create_entity(entity_id, request)
252
+ start.uri('/api/entity')
253
+ .url_segment(entity_id)
254
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
255
+ .post()
256
+ .go()
257
+ end
258
+
259
+ #
260
+ # Creates a Entity Type. You can optionally specify an Id for the Entity Type, if not provided one will be generated.
261
+ #
262
+ # @param entity_type_id [string] (Optional) The Id for the Entity Type. If not provided a secure random UUID will be generated.
263
+ # @param request [OpenStruct, Hash] The request object that contains all of the information used to create the Entity Type.
264
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
265
+ def create_entity_type(entity_type_id, request)
266
+ start.uri('/api/entity/type')
267
+ .url_segment(entity_type_id)
268
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
269
+ .post()
270
+ .go()
271
+ end
272
+
273
+ #
274
+ # Creates a new permission for an entity type. You must specify the id of the entity type you are creating the permission for.
275
+ # You can optionally specify an Id for the permission inside the EntityTypePermission object itself, if not provided one will be generated.
276
+ #
277
+ # @param entity_type_id [string] The Id of the entity type to create the permission on.
278
+ # @param permission_id [string] (Optional) The Id of the permission. If not provided a secure random UUID will be generated.
279
+ # @param request [OpenStruct, Hash] The request object that contains all of the information used to create the permission.
280
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
281
+ def create_entity_type_permission(entity_type_id, permission_id, request)
282
+ start.uri('/api/entity/type')
283
+ .url_segment(entity_type_id)
284
+ .url_segment("permission")
285
+ .url_segment(permission_id)
286
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
287
+ .post()
288
+ .go()
289
+ end
290
+
215
291
  #
216
292
  # Creates a family with the user id in the request as the owner and sole member of the family. You can optionally specify an id for the
217
293
  # family, if not provided one will be generated.
@@ -309,6 +385,34 @@ module FusionAuth
309
385
  .go()
310
386
  end
311
387
 
388
+ #
389
+ # Creates an message template. You can optionally specify an Id for the template, if not provided one will be generated.
390
+ #
391
+ # @param message_template_id [string] (Optional) The Id for the template. If not provided a secure random UUID will be generated.
392
+ # @param request [OpenStruct, Hash] The request object that contains all of the information used to create the message template.
393
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
394
+ def create_message_template(message_template_id, request)
395
+ start.uri('/api/message/template')
396
+ .url_segment(message_template_id)
397
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
398
+ .post()
399
+ .go()
400
+ end
401
+
402
+ #
403
+ # Creates a messenger. You can optionally specify an Id for the messenger, if not provided one will be generated.
404
+ #
405
+ # @param messenger_id [string] (Optional) The Id for the messenger. If not provided a secure random UUID will be generated.
406
+ # @param request [OpenStruct, Hash] The request object that contains all of the information used to create the messenger.
407
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
408
+ def create_messenger(messenger_id, request)
409
+ start.uri('/api/messenger')
410
+ .url_segment(messenger_id)
411
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
412
+ .post()
413
+ .go()
414
+ end
415
+
312
416
  #
313
417
  # Creates a tenant. You can optionally specify an Id for the tenant, if not provided one will be generated.
314
418
  #
@@ -395,6 +499,18 @@ module FusionAuth
395
499
  .go()
396
500
  end
397
501
 
502
+ #
503
+ # Link an external user from a 3rd party identity provider to a FusionAuth user.
504
+ #
505
+ # @param request [OpenStruct, Hash] The request object that contains all of the information used to link the FusionAuth user.
506
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
507
+ def create_user_link(request)
508
+ start.uri('/api/identity-provider/link')
509
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
510
+ .post()
511
+ .go()
512
+ end
513
+
398
514
  #
399
515
  # Creates a webhook. You can optionally specify an Id for the webhook, if not provided one will be generated.
400
516
  #
@@ -421,6 +537,16 @@ module FusionAuth
421
537
  .go()
422
538
  end
423
539
 
540
+ #
541
+ # Deactivates the FusionAuth Reactor.
542
+ #
543
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
544
+ def deactivate_reactor()
545
+ start.uri('/api/reactor')
546
+ .delete()
547
+ .go()
548
+ end
549
+
424
550
  #
425
551
  # Deactivates the user with the given Id.
426
552
  #
@@ -474,6 +600,18 @@ module FusionAuth
474
600
  .go()
475
601
  end
476
602
 
603
+ #
604
+ # Deletes the API key for the given Id.
605
+ #
606
+ # @param key_id [string] The Id of the authentication API key to delete.
607
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
608
+ def delete_api_key(key_id)
609
+ start.uri('/api/api-key')
610
+ .url_segment(key_id)
611
+ .delete()
612
+ .go()
613
+ end
614
+
477
615
  #
478
616
  # Hard deletes an application. This is a dangerous operation and should not be used in most circumstances. This will
479
617
  # delete the application, any registrations for that application, metrics and reports for the application, all the
@@ -542,6 +680,63 @@ module FusionAuth
542
680
  .go()
543
681
  end
544
682
 
683
+ #
684
+ # Deletes the Entity for the given Id.
685
+ #
686
+ # @param entity_id [string] The Id of the Entity to delete.
687
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
688
+ def delete_entity(entity_id)
689
+ start.uri('/api/entity')
690
+ .url_segment(entity_id)
691
+ .delete()
692
+ .go()
693
+ end
694
+
695
+ #
696
+ # Deletes an Entity Grant for the given User or Entity.
697
+ #
698
+ # @param entity_id [string] The Id of the Entity that the Entity Grant is being deleted for.
699
+ # @param recipient_entity_id [string] (Optional) The Id of the Entity that the Entity Grant is for.
700
+ # @param user_id [string] (Optional) The Id of the User that the Entity Grant is for.
701
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
702
+ def delete_entity_grant(entity_id, recipient_entity_id, user_id)
703
+ start.uri('/api/entity')
704
+ .url_segment(entity_id)
705
+ .url_segment("grant")
706
+ .url_parameter('recipientEntityId', recipient_entity_id)
707
+ .url_parameter('userId', user_id)
708
+ .delete()
709
+ .go()
710
+ end
711
+
712
+ #
713
+ # Deletes the Entity Type for the given Id.
714
+ #
715
+ # @param entity_type_id [string] The Id of the Entity Type to delete.
716
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
717
+ def delete_entity_type(entity_type_id)
718
+ start.uri('/api/entity/type')
719
+ .url_segment(entity_type_id)
720
+ .delete()
721
+ .go()
722
+ end
723
+
724
+ #
725
+ # Hard deletes a permission. This is a dangerous operation and should not be used in most circumstances. This
726
+ # permanently removes the given permission from all grants that had it.
727
+ #
728
+ # @param entity_type_id [string] The Id of the entityType the the permission belongs to.
729
+ # @param permission_id [string] The Id of the permission to delete.
730
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
731
+ def delete_entity_type_permission(entity_type_id, permission_id)
732
+ start.uri('/api/entity/type')
733
+ .url_segment(entity_type_id)
734
+ .url_segment("permission")
735
+ .url_segment(permission_id)
736
+ .delete()
737
+ .go()
738
+ end
739
+
545
740
  #
546
741
  # Deletes the form for the given Id.
547
742
  #
@@ -626,6 +821,30 @@ module FusionAuth
626
821
  .go()
627
822
  end
628
823
 
824
+ #
825
+ # Deletes the message template for the given Id.
826
+ #
827
+ # @param message_template_id [string] The Id of the message template to delete.
828
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
829
+ def delete_message_template(message_template_id)
830
+ start.uri('/api/message/template')
831
+ .url_segment(message_template_id)
832
+ .delete()
833
+ .go()
834
+ end
835
+
836
+ #
837
+ # Deletes the messenger for the given Id.
838
+ #
839
+ # @param messenger_id [string] The Id of the messenger to delete.
840
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
841
+ def delete_messenger(messenger_id)
842
+ start.uri('/api/messenger')
843
+ .url_segment(messenger_id)
844
+ .delete()
845
+ .go()
846
+ end
847
+
629
848
  #
630
849
  # Deletes the user registration for the given user and application.
631
850
  #
@@ -718,6 +937,22 @@ module FusionAuth
718
937
  .go()
719
938
  end
720
939
 
940
+ #
941
+ # Remove an existing link that has been made from a 3rd party identity provider to a FusionAuth user.
942
+ #
943
+ # @param identity_provider_id [string] The unique Id of the identity provider.
944
+ # @param identity_provider_user_id [string] The unique Id of the user in the 3rd party identity provider to unlink.
945
+ # @param user_id [string] The unique Id of the FusionAuth user to unlink.
946
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
947
+ def delete_user_link(identity_provider_id, identity_provider_user_id, user_id)
948
+ start.uri('/api/identity-provider/link')
949
+ .url_parameter('identityProviderId', identity_provider_id)
950
+ .url_parameter('identityProviderUserId', identity_provider_user_id)
951
+ .url_parameter('userId', user_id)
952
+ .delete()
953
+ .go()
954
+ end
955
+
721
956
  #
722
957
  # Deletes the users with the given ids, or users matching the provided JSON query or queryString.
723
958
  # The order of preference is ids, query and then queryString, it is recommended to only provide one of the three for the request.
@@ -767,11 +1002,13 @@ module FusionAuth
767
1002
  # Disable Two Factor authentication for a user.
768
1003
  #
769
1004
  # @param user_id [string] The Id of the User for which you're disabling Two Factor authentication.
1005
+ # @param method_id [string] The two-factor method identifier you wish to disable
770
1006
  # @param code [string] The Two Factor code used verify the the caller knows the Two Factor secret.
771
1007
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
772
- def disable_two_factor(user_id, code)
1008
+ def disable_two_factor(user_id, method_id, code)
773
1009
  start.uri('/api/user/two-factor')
774
1010
  .url_parameter('userId', user_id)
1011
+ .url_parameter('methodId', method_id)
775
1012
  .url_parameter('code', code)
776
1013
  .delete()
777
1014
  .go()
@@ -959,6 +1196,18 @@ module FusionAuth
959
1196
  .go()
960
1197
  end
961
1198
 
1199
+ #
1200
+ # Generate two-factor recovery codes for a user. Generating two-factor recovery codes will invalidate any existing recovery codes.
1201
+ #
1202
+ # @param user_id [string] The Id of the user to generate new Two Factor recovery codes.
1203
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
1204
+ def generate_two_factor_recovery_codes(user_id)
1205
+ start.uri('/api/user/two-factor/recovery-code')
1206
+ .url_segment(user_id)
1207
+ .post()
1208
+ .go()
1209
+ end
1210
+
962
1211
  #
963
1212
  # Generate a Two Factor secret that can be used to enable Two Factor authentication for a User. The response will contain
964
1213
  # both the secret and a Base32 encoded form of the secret which can be shown to a User when using a 2 Step Authentication
@@ -1182,6 +1431,20 @@ module FusionAuth
1182
1431
  .go()
1183
1432
  end
1184
1433
 
1434
+ #
1435
+ # Updates an authentication API key by given id
1436
+ #
1437
+ # @param key_id [string] The Id of the authentication key. If not provided a secure random api key will be generated.
1438
+ # @param request [OpenStruct, Hash] The request object that contains all of the information needed to create the APIKey.
1439
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
1440
+ def patch_api_key(key_id, request)
1441
+ start.uri('/api/api-key')
1442
+ .url_segment(key_id)
1443
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
1444
+ .post()
1445
+ .go()
1446
+ end
1447
+
1185
1448
  #
1186
1449
  # Updates, via PATCH, the application with the given Id.
1187
1450
  #
@@ -1255,6 +1518,20 @@ module FusionAuth
1255
1518
  .go()
1256
1519
  end
1257
1520
 
1521
+ #
1522
+ # Updates, via PATCH, the Entity Type with the given Id.
1523
+ #
1524
+ # @param entity_type_id [string] The Id of the Entity Type to update.
1525
+ # @param request [OpenStruct, Hash] The request that contains just the new Entity Type information.
1526
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
1527
+ def patch_entity_type(entity_type_id, request)
1528
+ start.uri('/api/entity/type')
1529
+ .url_segment(entity_type_id)
1530
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
1531
+ .patch()
1532
+ .go()
1533
+ end
1534
+
1258
1535
  #
1259
1536
  # Updates, via PATCH, the group with the given Id.
1260
1537
  #
@@ -1309,6 +1586,34 @@ module FusionAuth
1309
1586
  .go()
1310
1587
  end
1311
1588
 
1589
+ #
1590
+ # Updates, via PATCH, the message template with the given Id.
1591
+ #
1592
+ # @param message_template_id [string] The Id of the message template to update.
1593
+ # @param request [OpenStruct, Hash] The request that contains just the new message template information.
1594
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
1595
+ def patch_message_template(message_template_id, request)
1596
+ start.uri('/api/message/template')
1597
+ .url_segment(message_template_id)
1598
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
1599
+ .patch()
1600
+ .go()
1601
+ end
1602
+
1603
+ #
1604
+ # Updates, via PATCH, the messenger with the given Id.
1605
+ #
1606
+ # @param messenger_id [string] The Id of the messenger to update.
1607
+ # @param request [OpenStruct, Hash] The request that contains just the new messenger information.
1608
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
1609
+ def patch_messenger(messenger_id, request)
1610
+ start.uri('/api/messenger')
1611
+ .url_segment(messenger_id)
1612
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
1613
+ .patch()
1614
+ .go()
1615
+ end
1616
+
1312
1617
  #
1313
1618
  # Updates, via PATCH, the registration for the user with the given id and the application defined in the request.
1314
1619
  #
@@ -1470,6 +1775,19 @@ module FusionAuth
1470
1775
  .go()
1471
1776
  end
1472
1777
 
1778
+ #
1779
+ # Request a refresh of the Entity search index. This API is not generally necessary and the search index will become consistent in a
1780
+ # reasonable amount of time. There may be scenarios where you may wish to manually request an index refresh. One example may be
1781
+ # if you are using the Search API or Delete Tenant API immediately following a Entity Create etc, you may wish to request a refresh to
1782
+ # ensure the index immediately current before making a query request to the search index.
1783
+ #
1784
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
1785
+ def refresh_entity_search_index()
1786
+ start.uri('/api/entity/search')
1787
+ .put()
1788
+ .go()
1789
+ end
1790
+
1473
1791
  #
1474
1792
  # Request a refresh of the User search index. This API is not generally necessary and the search index will become consistent in a
1475
1793
  # reasonable amount of time. There may be scenarios where you may wish to manually request an index refresh. One example may be
@@ -1483,6 +1801,16 @@ module FusionAuth
1483
1801
  .go()
1484
1802
  end
1485
1803
 
1804
+ #
1805
+ # Regenerates any keys that are used by the FusionAuth Reactor.
1806
+ #
1807
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
1808
+ def regenerate_reactor_keys()
1809
+ start.uri('/api/reactor')
1810
+ .put()
1811
+ .go()
1812
+ end
1813
+
1486
1814
  #
1487
1815
  # Registers a user for an application. If you provide the User and the UserRegistration object on this request, it
1488
1816
  # will create the user as well as register them for the application. This is called a Full Registration. However, if
@@ -1501,6 +1829,22 @@ module FusionAuth
1501
1829
  .go()
1502
1830
  end
1503
1831
 
1832
+ #
1833
+ # Requests Elasticsearch to delete and rebuild the index for FusionAuth users or entities. Be very careful when running this request as it will
1834
+ # increase the CPU and I/O load on your database until the operation completes. Generally speaking you do not ever need to run this operation unless
1835
+ # instructed by FusionAuth support, or if you are migrating a database another system and you are not brining along the Elasticsearch index.
1836
+ #
1837
+ # You have been warned.
1838
+ #
1839
+ # @param request [OpenStruct, Hash] The request that contains the index name.
1840
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
1841
+ def reindex(request)
1842
+ start.uri('/api/system/reindex')
1843
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
1844
+ .post()
1845
+ .go()
1846
+ end
1847
+
1504
1848
  #
1505
1849
  # Removes a user from the family with the given id.
1506
1850
  #
@@ -1556,6 +1900,18 @@ module FusionAuth
1556
1900
  .go()
1557
1901
  end
1558
1902
 
1903
+ #
1904
+ # Retrieves an authentication API key for the given id
1905
+ #
1906
+ # @param key_id [string] The Id of the API key to retrieve.
1907
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
1908
+ def retrieve_api_key(key_id)
1909
+ start.uri('/api/api-key')
1910
+ .url_segment(key_id)
1911
+ .get()
1912
+ .go()
1913
+ end
1914
+
1559
1915
  #
1560
1916
  # Retrieves a single action log (the log of a user action that was taken on a user previously) for the given Id.
1561
1917
  #
@@ -1739,6 +2095,57 @@ module FusionAuth
1739
2095
  .go()
1740
2096
  end
1741
2097
 
2098
+ #
2099
+ # Retrieves the Entity for the given Id.
2100
+ #
2101
+ # @param entity_id [string] The Id of the Entity.
2102
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
2103
+ def retrieve_entity(entity_id)
2104
+ start.uri('/api/entity')
2105
+ .url_segment(entity_id)
2106
+ .get()
2107
+ .go()
2108
+ end
2109
+
2110
+ #
2111
+ # Retrieves an Entity Grant for the given Entity and User/Entity.
2112
+ #
2113
+ # @param entity_id [string] The Id of the Entity.
2114
+ # @param recipient_entity_id [string] (Optional) The Id of the Entity that the Entity Grant is for.
2115
+ # @param user_id [string] (Optional) The Id of the User that the Entity Grant is for.
2116
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
2117
+ def retrieve_entity_grant(entity_id, recipient_entity_id, user_id)
2118
+ start.uri('/api/entity')
2119
+ .url_segment(entity_id)
2120
+ .url_segment("grant")
2121
+ .url_parameter('recipientEntityId', recipient_entity_id)
2122
+ .url_parameter('userId', user_id)
2123
+ .get()
2124
+ .go()
2125
+ end
2126
+
2127
+ #
2128
+ # Retrieves the Entity Type for the given Id.
2129
+ #
2130
+ # @param entity_type_id [string] The Id of the Entity Type.
2131
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
2132
+ def retrieve_entity_type(entity_type_id)
2133
+ start.uri('/api/entity/type')
2134
+ .url_segment(entity_type_id)
2135
+ .get()
2136
+ .go()
2137
+ end
2138
+
2139
+ #
2140
+ # Retrieves all of the Entity Types.
2141
+ #
2142
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
2143
+ def retrieve_entity_types()
2144
+ start.uri('/api/entity/type')
2145
+ .get()
2146
+ .go()
2147
+ end
2148
+
1742
2149
  #
1743
2150
  # Retrieves a single event log for the given Id.
1744
2151
  #
@@ -2040,6 +2447,62 @@ module FusionAuth
2040
2447
  .go()
2041
2448
  end
2042
2449
 
2450
+ #
2451
+ # Retrieves the message template for the given Id. If you don't specify the id, this will return all of the message templates.
2452
+ #
2453
+ # @param message_template_id [string] (Optional) The Id of the message template.
2454
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
2455
+ def retrieve_message_template(message_template_id)
2456
+ start.uri('/api/message/template')
2457
+ .url_segment(message_template_id)
2458
+ .get()
2459
+ .go()
2460
+ end
2461
+
2462
+ #
2463
+ # Creates a preview of the message template provided in the request, normalized to a given locale.
2464
+ #
2465
+ # @param request [OpenStruct, Hash] The request that contains the email template and optionally a locale to render it in.
2466
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
2467
+ def retrieve_message_template_preview(request)
2468
+ start.uri('/api/message/template/preview')
2469
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
2470
+ .post()
2471
+ .go()
2472
+ end
2473
+
2474
+ #
2475
+ # Retrieves all of the message templates.
2476
+ #
2477
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
2478
+ def retrieve_message_templates()
2479
+ start.uri('/api/message/template')
2480
+ .get()
2481
+ .go()
2482
+ end
2483
+
2484
+ #
2485
+ # Retrieves the messenger with the given Id.
2486
+ #
2487
+ # @param messenger_id [string] The Id of the messenger.
2488
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
2489
+ def retrieve_messenger(messenger_id)
2490
+ start.uri('/api/messenger')
2491
+ .url_segment(messenger_id)
2492
+ .get()
2493
+ .go()
2494
+ end
2495
+
2496
+ #
2497
+ # Retrieves all of the messengers.
2498
+ #
2499
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
2500
+ def retrieve_messengers()
2501
+ start.uri('/api/messenger')
2502
+ .get()
2503
+ .go()
2504
+ end
2505
+
2043
2506
  #
2044
2507
  # Retrieves the monthly active user report between the two instants. If you specify an application id, it will only
2045
2508
  # return the monthly active counts for that application.
@@ -2119,6 +2582,16 @@ module FusionAuth
2119
2582
  .go()
2120
2583
  end
2121
2584
 
2585
+ #
2586
+ # Retrieves the FusionAuth Reactor status.
2587
+ #
2588
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
2589
+ def retrieve_reactor_status()
2590
+ start.uri('/api/reactor')
2591
+ .get()
2592
+ .go()
2593
+ end
2594
+
2122
2595
  #
2123
2596
  # Retrieves the last number of login records.
2124
2597
  #
@@ -2188,6 +2661,17 @@ module FusionAuth
2188
2661
  .go()
2189
2662
  end
2190
2663
 
2664
+ #
2665
+ # Retrieve the status of a re-index process. A status code of 200 indicates the re-index is in progress, a status code of
2666
+ # 404 indicates no re-index is in progress.
2667
+ #
2668
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
2669
+ def retrieve_reindex_status()
2670
+ start.uri('/api/system/reindex')
2671
+ .get()
2672
+ .go()
2673
+ end
2674
+
2191
2675
  #
2192
2676
  # Retrieves the system configuration.
2193
2677
  #
@@ -2253,6 +2737,18 @@ module FusionAuth
2253
2737
  .go()
2254
2738
  end
2255
2739
 
2740
+ #
2741
+ # Retrieve two-factor recovery codes for a user.
2742
+ #
2743
+ # @param user_id [string] The Id of the user to retrieve Two Factor recovery codes.
2744
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
2745
+ def retrieve_two_factor_recovery_codes(user_id)
2746
+ start.uri('/api/user/two-factor/recovery-code')
2747
+ .url_segment(user_id)
2748
+ .get()
2749
+ .go()
2750
+ end
2751
+
2256
2752
  #
2257
2753
  # Retrieves the user for the given Id.
2258
2754
  #
@@ -2421,6 +2917,36 @@ module FusionAuth
2421
2917
  .go()
2422
2918
  end
2423
2919
 
2920
+ #
2921
+ # Retrieve a single Identity Provider user (link).
2922
+ #
2923
+ # @param identity_provider_id [string] The unique Id of the identity provider.
2924
+ # @param identity_provider_user_id [string] The unique Id of the user in the 3rd party identity provider.
2925
+ # @param user_id [string] The unique Id of the FusionAuth user.
2926
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
2927
+ def retrieve_user_link(identity_provider_id, identity_provider_user_id, user_id)
2928
+ start.uri('/api/identity-provider/link')
2929
+ .url_parameter('identityProviderId', identity_provider_id)
2930
+ .url_parameter('identityProviderUserId', identity_provider_user_id)
2931
+ .url_parameter('userId', user_id)
2932
+ .get()
2933
+ .go()
2934
+ end
2935
+
2936
+ #
2937
+ # Retrieve all Identity Provider users (links) for the user. Specify the optional identityProviderId to retrieve links for a particular IdP.
2938
+ #
2939
+ # @param identity_provider_id [string] (Optional) The unique Id of the identity provider. Specify this value to reduce the links returned to those for a particular IdP.
2940
+ # @param user_id [string] The unique Id of the user.
2941
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
2942
+ def retrieve_user_links_by_user_id(identity_provider_id, user_id)
2943
+ start.uri('/api/identity-provider/link')
2944
+ .url_parameter('identityProviderId', identity_provider_id)
2945
+ .url_parameter('userId', user_id)
2946
+ .get()
2947
+ .go()
2948
+ end
2949
+
2424
2950
  #
2425
2951
  # Retrieves the login report between the two instants for a particular user by Id. If you specify an application id, it will only return the
2426
2952
  # login counts for that application.
@@ -2487,6 +3013,16 @@ module FusionAuth
2487
3013
  .go()
2488
3014
  end
2489
3015
 
3016
+ #
3017
+ # Retrieves the FusionAuth version string.
3018
+ #
3019
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
3020
+ def retrieve_version()
3021
+ start.uri('/api/system/version')
3022
+ .get()
3023
+ .go()
3024
+ end
3025
+
2490
3026
  #
2491
3027
  # Retrieves the webhook for the given Id. If you pass in null for the id, this will return all the webhooks.
2492
3028
  #
@@ -2634,6 +3170,54 @@ module FusionAuth
2634
3170
  .go()
2635
3171
  end
2636
3172
 
3173
+ #
3174
+ # Searches entities with the specified criteria and pagination.
3175
+ #
3176
+ # @param request [OpenStruct, Hash] The search criteria and pagination information.
3177
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
3178
+ def search_entities(request)
3179
+ start.uri('/api/entity/search')
3180
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
3181
+ .post()
3182
+ .go()
3183
+ end
3184
+
3185
+ #
3186
+ # Retrieves the entities for the given ids. If any id is invalid, it is ignored.
3187
+ #
3188
+ # @param ids [Array] The entity ids to search for.
3189
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
3190
+ def search_entities_by_ids(ids)
3191
+ start.uri('/api/entity/search')
3192
+ .url_parameter('ids', ids)
3193
+ .get()
3194
+ .go()
3195
+ end
3196
+
3197
+ #
3198
+ # Searches Entity Grants with the specified criteria and pagination.
3199
+ #
3200
+ # @param request [OpenStruct, Hash] The search criteria and pagination information.
3201
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
3202
+ def search_entity_grants(request)
3203
+ start.uri('/api/entity/grant/search')
3204
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
3205
+ .post()
3206
+ .go()
3207
+ end
3208
+
3209
+ #
3210
+ # Searches the entity types with the specified criteria and pagination.
3211
+ #
3212
+ # @param request [OpenStruct, Hash] The search criteria and pagination information.
3213
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
3214
+ def search_entity_types(request)
3215
+ start.uri('/api/entity/type/search')
3216
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
3217
+ .post()
3218
+ .go()
3219
+ end
3220
+
2637
3221
  #
2638
3222
  # Searches the event logs with the specified criteria and pagination.
2639
3223
  #
@@ -2754,6 +3338,7 @@ module FusionAuth
2754
3338
  #
2755
3339
  # @param request [OpenStruct, Hash] The request object that contains all of the information used to send the code.
2756
3340
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
3341
+ # @deprecated This method has been renamed to send_two_factor_code_for_enable_disable, use that method instead.
2757
3342
  def send_two_factor_code(request)
2758
3343
  start.uri('/api/two-factor/send')
2759
3344
  .body_handler(FusionAuth::JSONBodyHandler.new(request))
@@ -2761,11 +3346,24 @@ module FusionAuth
2761
3346
  .go()
2762
3347
  end
2763
3348
 
3349
+ #
3350
+ # Send a Two Factor authentication code to assist in setting up Two Factor authentication or disabling.
3351
+ #
3352
+ # @param request [OpenStruct, Hash] The request object that contains all of the information used to send the code.
3353
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
3354
+ def send_two_factor_code_for_enable_disable(request)
3355
+ start.uri('/api/two-factor/send')
3356
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
3357
+ .post()
3358
+ .go()
3359
+ end
3360
+
2764
3361
  #
2765
3362
  # Send a Two Factor authentication code to allow the completion of Two Factor authentication.
2766
3363
  #
2767
3364
  # @param two_factor_id [string] The Id returned by the Login API necessary to complete Two Factor authentication.
2768
3365
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
3366
+ # @deprecated This method has been renamed to send_two_factor_code_for_login_using_method, use that method instead.
2769
3367
  def send_two_factor_code_for_login(two_factor_id)
2770
3368
  startAnonymous.uri('/api/two-factor/send')
2771
3369
  .url_segment(two_factor_id)
@@ -2773,6 +3371,20 @@ module FusionAuth
2773
3371
  .go()
2774
3372
  end
2775
3373
 
3374
+ #
3375
+ # Send a Two Factor authentication code to allow the completion of Two Factor authentication.
3376
+ #
3377
+ # @param two_factor_id [string] The Id returned by the Login API necessary to complete Two Factor authentication.
3378
+ # @param request [OpenStruct, Hash] The Two Factor send request that contains all of the information used to send the Two Factor code to the user.
3379
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
3380
+ def send_two_factor_code_for_login_using_method(two_factor_id, request)
3381
+ startAnonymous.uri('/api/two-factor/send')
3382
+ .url_segment(two_factor_id)
3383
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
3384
+ .post()
3385
+ .go()
3386
+ end
3387
+
2776
3388
  #
2777
3389
  # Begins a login request for a 3rd party login that requires user interaction such as HYPR.
2778
3390
  #
@@ -2799,6 +3411,23 @@ module FusionAuth
2799
3411
  .go()
2800
3412
  end
2801
3413
 
3414
+ #
3415
+ # Start a Two-Factor login request by generating a two-factor identifier. This code can then be sent to the Two Factor Send
3416
+ # API (/api/two-factor/send)in order to send a one-time use code to a user. You can also use one-time use code returned
3417
+ # to send the code out-of-band. The Two-Factor login is completed by making a request to the Two-Factor Login
3418
+ # API (/api/two-factor/login). with the two-factor identifier and the one-time use code.
3419
+ #
3420
+ # This API is intended to allow you to begin a Two-Factor login outside of a normal login that originated from the Login API (/api/login).
3421
+ #
3422
+ # @param request [OpenStruct, Hash] The Two-Factor start request that contains all of the information used to begin the Two-Factor login request.
3423
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
3424
+ def start_two_factor_login(request)
3425
+ start.uri('/api/two-factor/start')
3426
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
3427
+ .post()
3428
+ .go()
3429
+ end
3430
+
2802
3431
  #
2803
3432
  # Complete login using a 2FA challenge
2804
3433
  #
@@ -2811,6 +3440,20 @@ module FusionAuth
2811
3440
  .go()
2812
3441
  end
2813
3442
 
3443
+ #
3444
+ # Updates an API key by given id
3445
+ #
3446
+ # @param api_key_id [string] The Id of the API key to update.
3447
+ # @param request [OpenStruct, Hash] The request object that contains all of the information used to create the API Key.
3448
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
3449
+ def update_api_key(api_key_id, request)
3450
+ start.uri('/api/api-key')
3451
+ .url_segment(api_key_id)
3452
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
3453
+ .put()
3454
+ .go()
3455
+ end
3456
+
2814
3457
  #
2815
3458
  # Updates the application with the given Id.
2816
3459
  #
@@ -2884,6 +3527,51 @@ module FusionAuth
2884
3527
  .go()
2885
3528
  end
2886
3529
 
3530
+ #
3531
+ # Updates the Entity with the given Id.
3532
+ #
3533
+ # @param entity_id [string] The Id of the Entity to update.
3534
+ # @param request [OpenStruct, Hash] The request that contains all of the new Entity information.
3535
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
3536
+ def update_entity(entity_id, request)
3537
+ start.uri('/api/entity')
3538
+ .url_segment(entity_id)
3539
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
3540
+ .put()
3541
+ .go()
3542
+ end
3543
+
3544
+ #
3545
+ # Updates the Entity Type with the given Id.
3546
+ #
3547
+ # @param entity_type_id [string] The Id of the Entity Type to update.
3548
+ # @param request [OpenStruct, Hash] The request that contains all of the new Entity Type information.
3549
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
3550
+ def update_entity_type(entity_type_id, request)
3551
+ start.uri('/api/entity/type')
3552
+ .url_segment(entity_type_id)
3553
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
3554
+ .put()
3555
+ .go()
3556
+ end
3557
+
3558
+ #
3559
+ # Updates the permission with the given id for the entity type.
3560
+ #
3561
+ # @param entity_type_id [string] The Id of the entityType that the permission belongs to.
3562
+ # @param permission_id [string] The Id of the permission to update.
3563
+ # @param request [OpenStruct, Hash] The request that contains all of the new permission information.
3564
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
3565
+ def update_entity_type_permission(entity_type_id, permission_id, request)
3566
+ start.uri('/api/entity/type')
3567
+ .url_segment(entity_type_id)
3568
+ .url_segment("permission")
3569
+ .url_segment(permission_id)
3570
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
3571
+ .put()
3572
+ .go()
3573
+ end
3574
+
2887
3575
  #
2888
3576
  # Updates the form with the given Id.
2889
3577
  #
@@ -2980,6 +3668,34 @@ module FusionAuth
2980
3668
  .go()
2981
3669
  end
2982
3670
 
3671
+ #
3672
+ # Updates the message template with the given Id.
3673
+ #
3674
+ # @param message_template_id [string] The Id of the message template to update.
3675
+ # @param request [OpenStruct, Hash] The request that contains all of the new message template information.
3676
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
3677
+ def update_message_template(message_template_id, request)
3678
+ start.uri('/api/message/template')
3679
+ .url_segment(message_template_id)
3680
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
3681
+ .put()
3682
+ .go()
3683
+ end
3684
+
3685
+ #
3686
+ # Updates the messenger with the given Id.
3687
+ #
3688
+ # @param messenger_id [string] The Id of the messenger to update.
3689
+ # @param request [OpenStruct, Hash] The request object that contains all of the new messenger information.
3690
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
3691
+ def update_messenger(messenger_id, request)
3692
+ start.uri('/api/messenger')
3693
+ .url_segment(messenger_id)
3694
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
3695
+ .put()
3696
+ .go()
3697
+ end
3698
+
2983
3699
  #
2984
3700
  # Updates the registration for the user with the given id and the application defined in the request.
2985
3701
  #
@@ -3104,6 +3820,21 @@ module FusionAuth
3104
3820
  .go()
3105
3821
  end
3106
3822
 
3823
+ #
3824
+ # Creates or updates an Entity Grant. This is when a User/Entity is granted permissions to an Entity.
3825
+ #
3826
+ # @param entity_id [string] The Id of the Entity that the User/Entity is being granted access to.
3827
+ # @param request [OpenStruct, Hash] The request object that contains all of the information used to create the Entity Grant.
3828
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
3829
+ def upsert_entity_grant(entity_id, request)
3830
+ start.uri('/api/entity')
3831
+ .url_segment(entity_id)
3832
+ .url_segment("grant")
3833
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
3834
+ .post()
3835
+ .go()
3836
+ end
3837
+
3107
3838
  #
3108
3839
  # Validates the end-user provided user_code from the user-interaction of the Device Authorization Grant.
3109
3840
  # If you build your own activation form you should validate the user provided code prior to beginning the Authorization grant.
@@ -3139,6 +3870,7 @@ module FusionAuth
3139
3870
  #
3140
3871
  # @param verification_id [string] The email verification id sent to the user.
3141
3872
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
3873
+ # @deprecated This method has been renamed to verify_email_address and changed to take a JSON request body, use that method instead.
3142
3874
  def verify_email(verification_id)
3143
3875
  startAnonymous.uri('/api/user/verify-email')
3144
3876
  .url_segment(verification_id)
@@ -3146,11 +3878,29 @@ module FusionAuth
3146
3878
  .go()
3147
3879
  end
3148
3880
 
3881
+ #
3882
+ # Confirms a user's email address.
3883
+ #
3884
+ # The request body will contain the verificationId. You may also be required to send a one-time use code based upon your configuration. When
3885
+ # the tenant is configured to gate a user until their email address is verified, this procedures requires two values instead of one.
3886
+ # The verificationId is a high entropy value and the one-time use code is a low entropy value that is easily entered in a user interactive form. The
3887
+ # two values together are able to confirm a user's email address and mark the user's email address as verified.
3888
+ #
3889
+ # @param request [OpenStruct, Hash] The request that contains the verificationId and optional one-time use code paired with the verificationId.
3890
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
3891
+ def verify_email_address(request)
3892
+ startAnonymous.uri('/api/user/verify-email')
3893
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
3894
+ .post()
3895
+ .go()
3896
+ end
3897
+
3149
3898
  #
3150
3899
  # Confirms an application registration. The Id given is usually from an email sent to the user.
3151
3900
  #
3152
3901
  # @param verification_id [string] The registration verification Id sent to the user.
3153
3902
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
3903
+ # @deprecated This method has been renamed to verify_user_registration and changed to take a JSON request body, use that method instead.
3154
3904
  def verify_registration(verification_id)
3155
3905
  startAnonymous.uri('/api/user/verify-registration')
3156
3906
  .url_segment(verification_id)
@@ -3158,6 +3908,23 @@ module FusionAuth
3158
3908
  .go()
3159
3909
  end
3160
3910
 
3911
+ #
3912
+ # Confirms a user's registration.
3913
+ #
3914
+ # The request body will contain the verificationId. You may also be required to send a one-time use code based upon your configuration. When
3915
+ # the application is configured to gate a user until their registration is verified, this procedures requires two values instead of one.
3916
+ # The verificationId is a high entropy value and the one-time use code is a low entropy value that is easily entered in a user interactive form. The
3917
+ # two values together are able to confirm a user's registration and mark the user's registration as verified.
3918
+ #
3919
+ # @param request [OpenStruct, Hash] The request that contains the verificationId and optional one-time use code paired with the verificationId.
3920
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
3921
+ def verify_user_registration(request)
3922
+ startAnonymous.uri('/api/user/verify-registration')
3923
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
3924
+ .post()
3925
+ .go()
3926
+ end
3927
+
3161
3928
  #
3162
3929
  # Starts the HTTP call
3163
3930
  #
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fusionauth_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.25.0
4
+ version: 1.28.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Pontarelli
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2021-03-11 00:00:00.000000000 Z
12
+ date: 2021-06-07 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: This library contains the Ruby client library that helps you connect
15
15
  your application to FusionAuth.
@@ -23,6 +23,7 @@ files:
23
23
  - ".gitignore"
24
24
  - ".ruby-version"
25
25
  - Gemfile
26
+ - Gemfile.lock
26
27
  - LICENSE.txt
27
28
  - README.md
28
29
  - Rakefile