fusionauth_client 1.22.1 → 1.26.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d0f60f6be98ee612f4db6e561984edd34809cb28ffcf6067d48e2a1ffea002ca
4
- data.tar.gz: 562ea8268599ee1d2ff67bc9861235f2da0f8d9d46d679ee8e076a3412ca8b93
3
+ metadata.gz: a950e65ea4b1b98b030175aa96aa10e60eaa283adffb60f940e7faaf03ea3db8
4
+ data.tar.gz: fb0218fa311d0c815042e7d062319827c5361a84831d42abd3be103886335a9e
5
5
  SHA512:
6
- metadata.gz: 1fd1072baa45440345d09b7210709aaf6281dfb1a4ff8ccef80c68c000325cf4c91f29cfa9f4dd6462c977fc6b078ba9a224218fb36d62af89462aaa677b1cd3
7
- data.tar.gz: 24131b46825b6567f22f85bae91883700a0135885e8951fc8a0a012d25fcb2e656d4a49d20c1d233f79733c29b36416f78018a1b6648aaa22f9b79e9f9dbae29
6
+ metadata.gz: 76a87d490167744f343858a59f416fcf97ecf351421d4b89463a8f523fe51bdd44c46724bf3824a5570ebf2e0db43287d8a256f4d5e581563716596560f9a8d8
7
+ data.tar.gz: cbe4905cd5fa7266e968a3fd506bcd0a7db27d1309ec03f11fe9c35a59f0e535ba20a400a7fbef1a089c4b05a8a8e724e1844daaf737db2263cfa03fd50d6b7e
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.26.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/README.md CHANGED
@@ -59,12 +59,19 @@ response = client.login({
59
59
  user = response.success.response.user
60
60
  ```
61
61
 
62
- ## Contributing
62
+ ## Questions and support
63
+
64
+ If you have a question or support issue regarding this client library, we'd love to hear from you.
65
+
66
+ If you have a paid edition with support included, please [open a ticket in your account portal](https://account.fusionauth.io/account/support/). Learn more about [paid editions here](https://fusionauth.io/pricing/).
63
67
 
64
- Bug reports and pull requests are welcome on GitHub at https://github.com/FusionAuth/fusionauth-ruby-client. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
68
+ Otherwise, please [post your question in the community forum](https://fusionauth.io/community/forum/).
69
+
70
+ ## Contributing
65
71
 
72
+ Bug reports and pull requests are welcome on GitHub at https://github.com/FusionAuth/fusionauth-ruby-client.
66
73
 
67
74
  ## License
68
75
 
69
- The gem is available as open source under the terms of the [Apache v2.0 License](https://opensource.org/licenses/Apache-2.0).
76
+ This code is available as open source under the terms of the [Apache v2.0 License](https://opensource.org/licenses/Apache-2.0).
70
77
 
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.22.1", licenses: ["ApacheV2_0"]) {
19
+ project(group: "io.fusionauth", name: "fusionauth-ruby-client", version: "1.26.0", licenses: ["ApacheV2_0"]) {
20
20
  workflow {
21
21
  standard()
22
22
  }
@@ -8,8 +8,36 @@
8
8
  </content>
9
9
  <orderEntry type="jdk" jdkName="rbenv: 2.5.1" jdkType="RUBY_SDK" />
10
10
  <orderEntry type="sourceFolder" forTests="false" />
11
- <orderEntry type="library" scope="PROVIDED" name="bundler (v2.1.4, rbenv: 2.5.1) [gem]" level="application" />
11
+ <orderEntry type="library" scope="PROVIDED" name="bundler (v2.2.5, rbenv: 2.5.1) [gem]" level="application" />
12
12
  <orderEntry type="library" scope="PROVIDED" name="minitest (v5.8.3, rbenv: 2.5.1) [gem]" level="application" />
13
13
  <orderEntry type="library" scope="PROVIDED" name="rake (v12.3.3, rbenv: 2.5.1) [gem]" level="application" />
14
14
  </component>
15
+ <component name="RakeTasksCache">
16
+ <option name="myRootTask">
17
+ <RakeTaskImpl id="rake">
18
+ <subtasks>
19
+ <RakeTaskImpl description="Build fusionauth_client-1.26.0.gem into the pkg directory" fullCommand="build" id="build" />
20
+ <RakeTaskImpl description="Remove any temporary products" fullCommand="clean" id="clean" />
21
+ <RakeTaskImpl description="Remove any generated files" fullCommand="clobber" id="clobber" />
22
+ <RakeTaskImpl description="Build and install fusionauth_client-1.26.0.gem into system gems" fullCommand="install" id="install" />
23
+ <RakeTaskImpl id="install">
24
+ <subtasks>
25
+ <RakeTaskImpl description="Build and install fusionauth_client-1.26.0.gem into system gems without network access" fullCommand="install:local" id="local" />
26
+ </subtasks>
27
+ </RakeTaskImpl>
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
+ <RakeTaskImpl description="Run tests" fullCommand="test" id="test" />
30
+ <RakeTaskImpl description="" fullCommand="default" id="default" />
31
+ <RakeTaskImpl description="" fullCommand="release" id="release" />
32
+ <RakeTaskImpl id="release">
33
+ <subtasks>
34
+ <RakeTaskImpl description="" fullCommand="release:guard_clean" id="guard_clean" />
35
+ <RakeTaskImpl description="" fullCommand="release:rubygem_push" id="rubygem_push" />
36
+ <RakeTaskImpl description="" fullCommand="release:source_control_push" id="source_control_push" />
37
+ </subtasks>
38
+ </RakeTaskImpl>
39
+ </subtasks>
40
+ </RakeTaskImpl>
41
+ </option>
42
+ </component>
15
43
  </module>
@@ -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.22.1'
7
+ spec.version = '1.26.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,20 @@ 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 license_id [string] The license id
62
+ # @param request [OpenStruct, Hash] An optional request that contains the license text to activate Reactor (useful for air-gap deployments of FusionAuth).
63
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
64
+ def activate_reactor(license_id, request)
65
+ start.uri('/api/reactor')
66
+ .url_segment(license_id)
67
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
68
+ .post()
69
+ .go()
70
+ end
71
+
58
72
  #
59
73
  # Adds a user to an existing family. The family id must be specified.
60
74
  #
@@ -124,6 +138,24 @@ module FusionAuth
124
138
  .go()
125
139
  end
126
140
 
141
+ #
142
+ # Creates an API key. You can optionally specify a unique Id for the key, if not provided one will be generated.
143
+ # an API key can only be created with equal or lesser authority. An API key cannot create another API key unless it is granted
144
+ # to that API key.
145
+ #
146
+ # If an API key is locked to a tenant, it can only create API Keys for that same tenant.
147
+ #
148
+ # @param key_id [string] (Optional) The unique Id of the API key. If not provided a secure random Id will be generated.
149
+ # @param request [OpenStruct, Hash] The request object that contains all of the information needed to create the APIKey.
150
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
151
+ def create_api_key(key_id, request)
152
+ start.uri('/api/api-key')
153
+ .url_segment(key_id)
154
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
155
+ .post()
156
+ .go()
157
+ end
158
+
127
159
  #
128
160
  # Creates an application. You can optionally specify an Id for the application, if not provided one will be generated.
129
161
  #
@@ -212,6 +244,52 @@ module FusionAuth
212
244
  .go()
213
245
  end
214
246
 
247
+ #
248
+ # Creates an Entity. You can optionally specify an Id for the Entity. If not provided one will be generated.
249
+ #
250
+ # @param entity_id [string] (Optional) The Id for the Entity. If not provided a secure random UUID will be generated.
251
+ # @param request [OpenStruct, Hash] The request object that contains all of the information used to create the Entity.
252
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
253
+ def create_entity(entity_id, request)
254
+ start.uri('/api/entity')
255
+ .url_segment(entity_id)
256
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
257
+ .post()
258
+ .go()
259
+ end
260
+
261
+ #
262
+ # Creates a Entity Type. You can optionally specify an Id for the Entity Type, if not provided one will be generated.
263
+ #
264
+ # @param entity_type_id [string] (Optional) The Id for the Entity Type. If not provided a secure random UUID will be generated.
265
+ # @param request [OpenStruct, Hash] The request object that contains all of the information used to create the Entity Type.
266
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
267
+ def create_entity_type(entity_type_id, request)
268
+ start.uri('/api/entity/type')
269
+ .url_segment(entity_type_id)
270
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
271
+ .post()
272
+ .go()
273
+ end
274
+
275
+ #
276
+ # Creates a new permission for an entity type. You must specify the id of the entity type you are creating the permission for.
277
+ # You can optionally specify an Id for the permission inside the EntityTypePermission object itself, if not provided one will be generated.
278
+ #
279
+ # @param entity_type_id [string] The Id of the entity type to create the permission on.
280
+ # @param permission_id [string] (Optional) The Id of the permission. If not provided a secure random UUID will be generated.
281
+ # @param request [OpenStruct, Hash] The request object that contains all of the information used to create the permission.
282
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
283
+ def create_entity_type_permission(entity_type_id, permission_id, request)
284
+ start.uri('/api/entity/type')
285
+ .url_segment(entity_type_id)
286
+ .url_segment("permission")
287
+ .url_segment(permission_id)
288
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
289
+ .post()
290
+ .go()
291
+ end
292
+
215
293
  #
216
294
  # 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
295
  # family, if not provided one will be generated.
@@ -309,6 +387,34 @@ module FusionAuth
309
387
  .go()
310
388
  end
311
389
 
390
+ #
391
+ # Creates an message template. You can optionally specify an Id for the template, if not provided one will be generated.
392
+ #
393
+ # @param message_template_id [string] (Optional) The Id for the template. If not provided a secure random UUID will be generated.
394
+ # @param request [OpenStruct, Hash] The request object that contains all of the information used to create the message template.
395
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
396
+ def create_message_template(message_template_id, request)
397
+ start.uri('/api/message/template')
398
+ .url_segment(message_template_id)
399
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
400
+ .post()
401
+ .go()
402
+ end
403
+
404
+ #
405
+ # Creates a messenger. You can optionally specify an Id for the messenger, if not provided one will be generated.
406
+ #
407
+ # @param messenger_id [string] (Optional) The Id for the messenger. If not provided a secure random UUID will be generated.
408
+ # @param request [OpenStruct, Hash] The request object that contains all of the information used to create the messenger.
409
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
410
+ def create_messenger(messenger_id, request)
411
+ start.uri('/api/messenger')
412
+ .url_segment(messenger_id)
413
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
414
+ .post()
415
+ .go()
416
+ end
417
+
312
418
  #
313
419
  # Creates a tenant. You can optionally specify an Id for the tenant, if not provided one will be generated.
314
420
  #
@@ -421,6 +527,16 @@ module FusionAuth
421
527
  .go()
422
528
  end
423
529
 
530
+ #
531
+ # Deactivates the FusionAuth Reactor.
532
+ #
533
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
534
+ def deactivate_reactor()
535
+ start.uri('/api/reactor')
536
+ .delete()
537
+ .go()
538
+ end
539
+
424
540
  #
425
541
  # Deactivates the user with the given Id.
426
542
  #
@@ -474,6 +590,18 @@ module FusionAuth
474
590
  .go()
475
591
  end
476
592
 
593
+ #
594
+ # Deletes the API key for the given Id.
595
+ #
596
+ # @param key_id [string] The Id of the authentication API key to delete.
597
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
598
+ def delete_api_key(key_id)
599
+ start.uri('/api/api-key')
600
+ .url_segment(key_id)
601
+ .delete()
602
+ .go()
603
+ end
604
+
477
605
  #
478
606
  # Hard deletes an application. This is a dangerous operation and should not be used in most circumstances. This will
479
607
  # delete the application, any registrations for that application, metrics and reports for the application, all the
@@ -542,6 +670,63 @@ module FusionAuth
542
670
  .go()
543
671
  end
544
672
 
673
+ #
674
+ # Deletes the Entity for the given Id.
675
+ #
676
+ # @param entity_id [string] The Id of the Entity to delete.
677
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
678
+ def delete_entity(entity_id)
679
+ start.uri('/api/entity')
680
+ .url_segment(entity_id)
681
+ .delete()
682
+ .go()
683
+ end
684
+
685
+ #
686
+ # Deletes an Entity Grant for the given User or Entity.
687
+ #
688
+ # @param entity_id [string] The Id of the Entity that the Entity Grant is being deleted for.
689
+ # @param recipient_entity_id [string] (Optional) The Id of the Entity that the Entity Grant is for.
690
+ # @param user_id [string] (Optional) The Id of the User that the Entity Grant is for.
691
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
692
+ def delete_entity_grant(entity_id, recipient_entity_id, user_id)
693
+ start.uri('/api/entity')
694
+ .url_segment(entity_id)
695
+ .url_segment("grant")
696
+ .url_parameter('recipientEntityId', recipient_entity_id)
697
+ .url_parameter('userId', user_id)
698
+ .delete()
699
+ .go()
700
+ end
701
+
702
+ #
703
+ # Deletes the Entity Type for the given Id.
704
+ #
705
+ # @param entity_type_id [string] The Id of the Entity Type to delete.
706
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
707
+ def delete_entity_type(entity_type_id)
708
+ start.uri('/api/entity/type')
709
+ .url_segment(entity_type_id)
710
+ .delete()
711
+ .go()
712
+ end
713
+
714
+ #
715
+ # Hard deletes a permission. This is a dangerous operation and should not be used in most circumstances. This
716
+ # permanently removes the given permission from all grants that had it.
717
+ #
718
+ # @param entity_type_id [string] The Id of the entityType the the permission belongs to.
719
+ # @param permission_id [string] The Id of the permission to delete.
720
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
721
+ def delete_entity_type_permission(entity_type_id, permission_id)
722
+ start.uri('/api/entity/type')
723
+ .url_segment(entity_type_id)
724
+ .url_segment("permission")
725
+ .url_segment(permission_id)
726
+ .delete()
727
+ .go()
728
+ end
729
+
545
730
  #
546
731
  # Deletes the form for the given Id.
547
732
  #
@@ -626,6 +811,30 @@ module FusionAuth
626
811
  .go()
627
812
  end
628
813
 
814
+ #
815
+ # Deletes the message template for the given Id.
816
+ #
817
+ # @param message_template_id [string] The Id of the message template to delete.
818
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
819
+ def delete_message_template(message_template_id)
820
+ start.uri('/api/message/template')
821
+ .url_segment(message_template_id)
822
+ .delete()
823
+ .go()
824
+ end
825
+
826
+ #
827
+ # Deletes the messenger for the given Id.
828
+ #
829
+ # @param messenger_id [string] The Id of the messenger to delete.
830
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
831
+ def delete_messenger(messenger_id)
832
+ start.uri('/api/messenger')
833
+ .url_segment(messenger_id)
834
+ .delete()
835
+ .go()
836
+ end
837
+
629
838
  #
630
839
  # Deletes the user registration for the given user and application.
631
840
  #
@@ -767,11 +976,13 @@ module FusionAuth
767
976
  # Disable Two Factor authentication for a user.
768
977
  #
769
978
  # @param user_id [string] The Id of the User for which you're disabling Two Factor authentication.
979
+ # @param method_id [string] The two-factor method identifier you wish to disable
770
980
  # @param code [string] The Two Factor code used verify the the caller knows the Two Factor secret.
771
981
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
772
- def disable_two_factor(user_id, code)
982
+ def disable_two_factor(user_id, method_id, code)
773
983
  start.uri('/api/user/two-factor')
774
984
  .url_parameter('userId', user_id)
985
+ .url_parameter('methodId', method_id)
775
986
  .url_parameter('code', code)
776
987
  .delete()
777
988
  .go()
@@ -959,6 +1170,18 @@ module FusionAuth
959
1170
  .go()
960
1171
  end
961
1172
 
1173
+ #
1174
+ # Generate two-factor recovery codes for a user. Generating two-factor recovery codes will invalidate any existing recovery codes.
1175
+ #
1176
+ # @param user_id [string] The Id of the user to generate new Two Factor recovery codes.
1177
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
1178
+ def generate_two_factor_recovery_codes(user_id)
1179
+ start.uri('/api/user/two-factor/recovery-code')
1180
+ .url_segment(user_id)
1181
+ .post()
1182
+ .go()
1183
+ end
1184
+
962
1185
  #
963
1186
  # Generate a Two Factor secret that can be used to enable Two Factor authentication for a User. The response will contain
964
1187
  # 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 +1405,20 @@ module FusionAuth
1182
1405
  .go()
1183
1406
  end
1184
1407
 
1408
+ #
1409
+ # Updates an authentication API key by given id
1410
+ #
1411
+ # @param key_id [string] The Id of the authentication key. If not provided a secure random api key will be generated.
1412
+ # @param request [OpenStruct, Hash] The request object that contains all of the information needed to create the APIKey.
1413
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
1414
+ def patch_api_key(key_id, request)
1415
+ start.uri('/api/api-key')
1416
+ .url_segment(key_id)
1417
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
1418
+ .post()
1419
+ .go()
1420
+ end
1421
+
1185
1422
  #
1186
1423
  # Updates, via PATCH, the application with the given Id.
1187
1424
  #
@@ -1255,6 +1492,20 @@ module FusionAuth
1255
1492
  .go()
1256
1493
  end
1257
1494
 
1495
+ #
1496
+ # Updates, via PATCH, the Entity Type with the given Id.
1497
+ #
1498
+ # @param entity_type_id [string] The Id of the Entity Type to update.
1499
+ # @param request [OpenStruct, Hash] The request that contains just the new Entity Type information.
1500
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
1501
+ def patch_entity_type(entity_type_id, request)
1502
+ start.uri('/api/entity/type')
1503
+ .url_segment(entity_type_id)
1504
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
1505
+ .patch()
1506
+ .go()
1507
+ end
1508
+
1258
1509
  #
1259
1510
  # Updates, via PATCH, the group with the given Id.
1260
1511
  #
@@ -1309,6 +1560,34 @@ module FusionAuth
1309
1560
  .go()
1310
1561
  end
1311
1562
 
1563
+ #
1564
+ # Updates, via PATCH, the message template with the given Id.
1565
+ #
1566
+ # @param message_template_id [string] The Id of the message template to update.
1567
+ # @param request [OpenStruct, Hash] The request that contains just the new message template information.
1568
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
1569
+ def patch_message_template(message_template_id, request)
1570
+ start.uri('/api/message/template')
1571
+ .url_segment(message_template_id)
1572
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
1573
+ .patch()
1574
+ .go()
1575
+ end
1576
+
1577
+ #
1578
+ # Updates, via PATCH, the messenger with the given Id.
1579
+ #
1580
+ # @param messenger_id [string] The Id of the messenger to update.
1581
+ # @param request [OpenStruct, Hash] The request that contains just the new messenger information.
1582
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
1583
+ def patch_messenger(messenger_id, request)
1584
+ start.uri('/api/messenger')
1585
+ .url_segment(messenger_id)
1586
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
1587
+ .patch()
1588
+ .go()
1589
+ end
1590
+
1312
1591
  #
1313
1592
  # Updates, via PATCH, the registration for the user with the given id and the application defined in the request.
1314
1593
  #
@@ -1470,6 +1749,19 @@ module FusionAuth
1470
1749
  .go()
1471
1750
  end
1472
1751
 
1752
+ #
1753
+ # Request a refresh of the Entity search index. This API is not generally necessary and the search index will become consistent in a
1754
+ # reasonable amount of time. There may be scenarios where you may wish to manually request an index refresh. One example may be
1755
+ # 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
1756
+ # ensure the index immediately current before making a query request to the search index.
1757
+ #
1758
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
1759
+ def refresh_entity_search_index()
1760
+ start.uri('/api/entity/search')
1761
+ .put()
1762
+ .go()
1763
+ end
1764
+
1473
1765
  #
1474
1766
  # Request a refresh of the User search index. This API is not generally necessary and the search index will become consistent in a
1475
1767
  # reasonable amount of time. There may be scenarios where you may wish to manually request an index refresh. One example may be
@@ -1483,6 +1775,16 @@ module FusionAuth
1483
1775
  .go()
1484
1776
  end
1485
1777
 
1778
+ #
1779
+ # Regenerates any keys that are used by the FusionAuth Reactor.
1780
+ #
1781
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
1782
+ def regenerate_reactor_keys()
1783
+ start.uri('/api/reactor')
1784
+ .put()
1785
+ .go()
1786
+ end
1787
+
1486
1788
  #
1487
1789
  # Registers a user for an application. If you provide the User and the UserRegistration object on this request, it
1488
1790
  # will create the user as well as register them for the application. This is called a Full Registration. However, if
@@ -1556,6 +1858,18 @@ module FusionAuth
1556
1858
  .go()
1557
1859
  end
1558
1860
 
1861
+ #
1862
+ # Retrieves an authentication API key for the given id
1863
+ #
1864
+ # @param key_id [string] The Id of the API key to retrieve.
1865
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
1866
+ def retrieve_api_key(key_id)
1867
+ start.uri('/api/api-key')
1868
+ .url_segment(key_id)
1869
+ .get()
1870
+ .go()
1871
+ end
1872
+
1559
1873
  #
1560
1874
  # Retrieves a single action log (the log of a user action that was taken on a user previously) for the given Id.
1561
1875
  #
@@ -1739,6 +2053,57 @@ module FusionAuth
1739
2053
  .go()
1740
2054
  end
1741
2055
 
2056
+ #
2057
+ # Retrieves the Entity for the given Id.
2058
+ #
2059
+ # @param entity_id [string] The Id of the Entity.
2060
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
2061
+ def retrieve_entity(entity_id)
2062
+ start.uri('/api/entity')
2063
+ .url_segment(entity_id)
2064
+ .get()
2065
+ .go()
2066
+ end
2067
+
2068
+ #
2069
+ # Retrieves an Entity Grant for the given Entity and User/Entity.
2070
+ #
2071
+ # @param entity_id [string] The Id of the Entity.
2072
+ # @param recipient_entity_id [string] (Optional) The Id of the Entity that the Entity Grant is for.
2073
+ # @param user_id [string] (Optional) The Id of the User that the Entity Grant is for.
2074
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
2075
+ def retrieve_entity_grant(entity_id, recipient_entity_id, user_id)
2076
+ start.uri('/api/entity')
2077
+ .url_segment(entity_id)
2078
+ .url_segment("grant")
2079
+ .url_parameter('recipientEntityId', recipient_entity_id)
2080
+ .url_parameter('userId', user_id)
2081
+ .get()
2082
+ .go()
2083
+ end
2084
+
2085
+ #
2086
+ # Retrieves the Entity Type for the given Id.
2087
+ #
2088
+ # @param entity_type_id [string] The Id of the Entity Type.
2089
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
2090
+ def retrieve_entity_type(entity_type_id)
2091
+ start.uri('/api/entity/type')
2092
+ .url_segment(entity_type_id)
2093
+ .get()
2094
+ .go()
2095
+ end
2096
+
2097
+ #
2098
+ # Retrieves all of the Entity Types.
2099
+ #
2100
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
2101
+ def retrieve_entity_types()
2102
+ start.uri('/api/entity/type')
2103
+ .get()
2104
+ .go()
2105
+ end
2106
+
1742
2107
  #
1743
2108
  # Retrieves a single event log for the given Id.
1744
2109
  #
@@ -1844,7 +2209,7 @@ module FusionAuth
1844
2209
  #
1845
2210
  # Retrieves the identity provider for the given id or all of the identity providers if the id is null.
1846
2211
  #
1847
- # @param identity_provider_id [string] (Optional) The identity provider id.
2212
+ # @param identity_provider_id [string] The identity provider Id.
1848
2213
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
1849
2214
  def retrieve_identity_provider(identity_provider_id)
1850
2215
  start.uri('/api/identity-provider')
@@ -1853,6 +2218,20 @@ module FusionAuth
1853
2218
  .go()
1854
2219
  end
1855
2220
 
2221
+ #
2222
+ # Retrieves one or more identity provider for the given type. For types such as Google, Facebook, Twitter and LinkedIn, only a single
2223
+ # identity provider can exist. For types such as OpenID Connect and SAMLv2 more than one identity provider can be configured so this request
2224
+ # may return multiple identity providers.
2225
+ #
2226
+ # @param type [OpenStruct, Hash] The type of the identity provider.
2227
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
2228
+ def retrieve_identity_provider_by_type(type)
2229
+ start.uri('/api/identity-provider')
2230
+ .url_parameter('type', type)
2231
+ .get()
2232
+ .go()
2233
+ end
2234
+
1856
2235
  #
1857
2236
  # Retrieves all of the identity providers.
1858
2237
  #
@@ -2026,6 +2405,62 @@ module FusionAuth
2026
2405
  .go()
2027
2406
  end
2028
2407
 
2408
+ #
2409
+ # Retrieves the message template for the given Id. If you don't specify the id, this will return all of the message templates.
2410
+ #
2411
+ # @param message_template_id [string] (Optional) The Id of the message template.
2412
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
2413
+ def retrieve_message_template(message_template_id)
2414
+ start.uri('/api/message/template')
2415
+ .url_segment(message_template_id)
2416
+ .get()
2417
+ .go()
2418
+ end
2419
+
2420
+ #
2421
+ # Creates a preview of the message template provided in the request, normalized to a given locale.
2422
+ #
2423
+ # @param request [OpenStruct, Hash] The request that contains the email template and optionally a locale to render it in.
2424
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
2425
+ def retrieve_message_template_preview(request)
2426
+ start.uri('/api/message/template/preview')
2427
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
2428
+ .post()
2429
+ .go()
2430
+ end
2431
+
2432
+ #
2433
+ # Retrieves all of the message templates.
2434
+ #
2435
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
2436
+ def retrieve_message_templates()
2437
+ start.uri('/api/message/template')
2438
+ .get()
2439
+ .go()
2440
+ end
2441
+
2442
+ #
2443
+ # Retrieves the messenger with the given Id.
2444
+ #
2445
+ # @param messenger_id [string] The Id of the messenger.
2446
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
2447
+ def retrieve_messenger(messenger_id)
2448
+ start.uri('/api/messenger')
2449
+ .url_segment(messenger_id)
2450
+ .get()
2451
+ .go()
2452
+ end
2453
+
2454
+ #
2455
+ # Retrieves all of the messengers.
2456
+ #
2457
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
2458
+ def retrieve_messengers()
2459
+ start.uri('/api/messenger')
2460
+ .get()
2461
+ .go()
2462
+ end
2463
+
2029
2464
  #
2030
2465
  # Retrieves the monthly active user report between the two instants. If you specify an application id, it will only
2031
2466
  # return the monthly active counts for that application.
@@ -2105,6 +2540,16 @@ module FusionAuth
2105
2540
  .go()
2106
2541
  end
2107
2542
 
2543
+ #
2544
+ # Retrieves the FusionAuth Reactor status.
2545
+ #
2546
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
2547
+ def retrieve_reactor_status()
2548
+ start.uri('/api/reactor')
2549
+ .get()
2550
+ .go()
2551
+ end
2552
+
2108
2553
  #
2109
2554
  # Retrieves the last number of login records.
2110
2555
  #
@@ -2119,6 +2564,18 @@ module FusionAuth
2119
2564
  .go()
2120
2565
  end
2121
2566
 
2567
+ #
2568
+ # Retrieves a single refresh token by unique Id. This is not the same thing as the string value of the refresh token, if you have that, you already have what you need..
2569
+ #
2570
+ # @param user_id [string] The Id of the user.
2571
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
2572
+ def retrieve_refresh_token_by_id(user_id)
2573
+ start.uri('/api/jwt/refresh')
2574
+ .url_segment(user_id)
2575
+ .get()
2576
+ .go()
2577
+ end
2578
+
2122
2579
  #
2123
2580
  # Retrieves the refresh tokens that belong to the user with the given Id.
2124
2581
  #
@@ -2227,6 +2684,18 @@ module FusionAuth
2227
2684
  .go()
2228
2685
  end
2229
2686
 
2687
+ #
2688
+ # Retrieve two-factor recovery codes for a user.
2689
+ #
2690
+ # @param user_id [string] The Id of the user to retrieve Two Factor recovery codes.
2691
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
2692
+ def retrieve_two_factor_recovery_codes(user_id)
2693
+ start.uri('/api/user/two-factor/recovery-code')
2694
+ .url_segment(user_id)
2695
+ .get()
2696
+ .go()
2697
+ end
2698
+
2230
2699
  #
2231
2700
  # Retrieves the user for the given Id.
2232
2701
  #
@@ -2484,8 +2953,30 @@ module FusionAuth
2484
2953
  end
2485
2954
 
2486
2955
  #
2487
- # Revokes a single refresh token, all tokens for a user or all tokens for an application. If you provide a user id
2488
- # and an application id, this will delete all the refresh tokens for that user for that application.
2956
+ # Revokes refresh tokens.
2957
+ #
2958
+ # Usage examples:
2959
+ # - Delete a single refresh token, pass in only the token.
2960
+ # revokeRefreshToken(token)
2961
+ #
2962
+ # - Delete all refresh tokens for a user, pass in only the userId.
2963
+ # revokeRefreshToken(null, userId)
2964
+ #
2965
+ # - Delete all refresh tokens for a user for a specific application, pass in both the userId and the applicationId.
2966
+ # revokeRefreshToken(null, userId, applicationId)
2967
+ #
2968
+ # - Delete all refresh tokens for an application
2969
+ # revokeRefreshToken(null, null, applicationId)
2970
+ #
2971
+ # Note: <code>null</code> may be handled differently depending upon the programming language.
2972
+ #
2973
+ # See also: (method names may vary by language... but you'll figure it out)
2974
+ #
2975
+ # - revokeRefreshTokenById
2976
+ # - revokeRefreshTokenByToken
2977
+ # - revokeRefreshTokensByUserId
2978
+ # - revokeRefreshTokensByApplicationId
2979
+ # - revokeRefreshTokensByUserIdForApplication
2489
2980
  #
2490
2981
  # @param token [string] (Optional) The refresh token to delete.
2491
2982
  # @param user_id [string] (Optional) The user id whose tokens to delete.
@@ -2500,6 +2991,68 @@ module FusionAuth
2500
2991
  .go()
2501
2992
  end
2502
2993
 
2994
+ #
2995
+ # Revokes a single refresh token by the unique Id. The unique Id is not sensitive as it cannot be used to obtain another JWT.
2996
+ #
2997
+ # @param token_id [string] The unique Id of the token to delete.
2998
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
2999
+ def revoke_refresh_token_by_id(token_id)
3000
+ start.uri('/api/jwt/refresh')
3001
+ .url_segment(token_id)
3002
+ .delete()
3003
+ .go()
3004
+ end
3005
+
3006
+ #
3007
+ # Revokes a single refresh token by using the actual refresh token value. This refresh token value is sensitive, so be careful with this API request.
3008
+ #
3009
+ # @param token [string] The refresh token to delete.
3010
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
3011
+ def revoke_refresh_token_by_token(token)
3012
+ start.uri('/api/jwt/refresh')
3013
+ .url_parameter('token', token)
3014
+ .delete()
3015
+ .go()
3016
+ end
3017
+
3018
+ #
3019
+ # Revoke all refresh tokens that belong to an application by applicationId.
3020
+ #
3021
+ # @param application_id [string] The unique Id of the application that you want to delete all refresh tokens for.
3022
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
3023
+ def revoke_refresh_tokens_by_application_id(application_id)
3024
+ start.uri('/api/jwt/refresh')
3025
+ .url_parameter('applicationId', application_id)
3026
+ .delete()
3027
+ .go()
3028
+ end
3029
+
3030
+ #
3031
+ # Revoke all refresh tokens that belong to a user by user Id.
3032
+ #
3033
+ # @param user_id [string] The unique Id of the user that you want to delete all refresh tokens for.
3034
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
3035
+ def revoke_refresh_tokens_by_user_id(user_id)
3036
+ start.uri('/api/jwt/refresh')
3037
+ .url_parameter('userId', user_id)
3038
+ .delete()
3039
+ .go()
3040
+ end
3041
+
3042
+ #
3043
+ # Revoke all refresh tokens that belong to a user by user Id for a specific application by applicationId.
3044
+ #
3045
+ # @param user_id [string] The unique Id of the user that you want to delete all refresh tokens for.
3046
+ # @param application_id [string] The unique Id of the application that you want to delete refresh tokens for.
3047
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
3048
+ def revoke_refresh_tokens_by_user_id_for_application(user_id, application_id)
3049
+ start.uri('/api/jwt/refresh')
3050
+ .url_parameter('userId', user_id)
3051
+ .url_parameter('applicationId', application_id)
3052
+ .delete()
3053
+ .go()
3054
+ end
3055
+
2503
3056
  #
2504
3057
  # Revokes a single User consent by Id.
2505
3058
  #
@@ -2524,6 +3077,54 @@ module FusionAuth
2524
3077
  .go()
2525
3078
  end
2526
3079
 
3080
+ #
3081
+ # Searches entities with the specified criteria and pagination.
3082
+ #
3083
+ # @param request [OpenStruct, Hash] The search criteria and pagination information.
3084
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
3085
+ def search_entities(request)
3086
+ start.uri('/api/entity/search')
3087
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
3088
+ .post()
3089
+ .go()
3090
+ end
3091
+
3092
+ #
3093
+ # Retrieves the entities for the given ids. If any id is invalid, it is ignored.
3094
+ #
3095
+ # @param ids [Array] The entity ids to search for.
3096
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
3097
+ def search_entities_by_ids(ids)
3098
+ start.uri('/api/entity/search')
3099
+ .url_parameter('ids', ids)
3100
+ .get()
3101
+ .go()
3102
+ end
3103
+
3104
+ #
3105
+ # Searches Entity Grants with the specified criteria and pagination.
3106
+ #
3107
+ # @param request [OpenStruct, Hash] The search criteria and pagination information.
3108
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
3109
+ def search_entity_grants(request)
3110
+ start.uri('/api/entity/grant/search')
3111
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
3112
+ .post()
3113
+ .go()
3114
+ end
3115
+
3116
+ #
3117
+ # Searches the entity types with the specified criteria and pagination.
3118
+ #
3119
+ # @param request [OpenStruct, Hash] The search criteria and pagination information.
3120
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
3121
+ def search_entity_types(request)
3122
+ start.uri('/api/entity/type/search')
3123
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
3124
+ .post()
3125
+ .go()
3126
+ end
3127
+
2527
3128
  #
2528
3129
  # Searches the event logs with the specified criteria and pagination.
2529
3130
  #
@@ -2644,6 +3245,7 @@ module FusionAuth
2644
3245
  #
2645
3246
  # @param request [OpenStruct, Hash] The request object that contains all of the information used to send the code.
2646
3247
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
3248
+ # @deprecated This method has been renamed to send_two_factor_code_for_enable_disable, use that method instead.
2647
3249
  def send_two_factor_code(request)
2648
3250
  start.uri('/api/two-factor/send')
2649
3251
  .body_handler(FusionAuth::JSONBodyHandler.new(request))
@@ -2651,11 +3253,24 @@ module FusionAuth
2651
3253
  .go()
2652
3254
  end
2653
3255
 
3256
+ #
3257
+ # Send a Two Factor authentication code to assist in setting up Two Factor authentication or disabling.
3258
+ #
3259
+ # @param request [OpenStruct, Hash] The request object that contains all of the information used to send the code.
3260
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
3261
+ def send_two_factor_code_for_enable_disable(request)
3262
+ start.uri('/api/two-factor/send')
3263
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
3264
+ .post()
3265
+ .go()
3266
+ end
3267
+
2654
3268
  #
2655
3269
  # Send a Two Factor authentication code to allow the completion of Two Factor authentication.
2656
3270
  #
2657
3271
  # @param two_factor_id [string] The Id returned by the Login API necessary to complete Two Factor authentication.
2658
3272
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
3273
+ # @deprecated This method has been renamed to send_two_factor_code_for_login_using_method, use that method instead.
2659
3274
  def send_two_factor_code_for_login(two_factor_id)
2660
3275
  startAnonymous.uri('/api/two-factor/send')
2661
3276
  .url_segment(two_factor_id)
@@ -2663,6 +3278,20 @@ module FusionAuth
2663
3278
  .go()
2664
3279
  end
2665
3280
 
3281
+ #
3282
+ # Send a Two Factor authentication code to allow the completion of Two Factor authentication.
3283
+ #
3284
+ # @param two_factor_id [string] The Id returned by the Login API necessary to complete Two Factor authentication.
3285
+ # @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.
3286
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
3287
+ def send_two_factor_code_for_login_using_method(two_factor_id, request)
3288
+ startAnonymous.uri('/api/two-factor/send')
3289
+ .url_segment(two_factor_id)
3290
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
3291
+ .post()
3292
+ .go()
3293
+ end
3294
+
2666
3295
  #
2667
3296
  # Begins a login request for a 3rd party login that requires user interaction such as HYPR.
2668
3297
  #
@@ -2689,6 +3318,23 @@ module FusionAuth
2689
3318
  .go()
2690
3319
  end
2691
3320
 
3321
+ #
3322
+ # Start a Two-Factor login request by generating a two-factor identifier. This code can then be sent to the Two Factor Send
3323
+ # 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
3324
+ # to send the code out-of-band. The Two-Factor login is completed by making a request to the Two-Factor Login
3325
+ # API (/api/two-factor/login). with the two-factor identifier and the one-time use code.
3326
+ #
3327
+ # 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).
3328
+ #
3329
+ # @param request [OpenStruct, Hash] The Two-Factor start request that contains all of the information used to begin the Two-Factor login request.
3330
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
3331
+ def start_two_factor_login(request)
3332
+ start.uri('/api/two-factor/start')
3333
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
3334
+ .post()
3335
+ .go()
3336
+ end
3337
+
2692
3338
  #
2693
3339
  # Complete login using a 2FA challenge
2694
3340
  #
@@ -2701,6 +3347,20 @@ module FusionAuth
2701
3347
  .go()
2702
3348
  end
2703
3349
 
3350
+ #
3351
+ # Updates an API key by given id
3352
+ #
3353
+ # @param api_key_id [string] The Id of the API key to update.
3354
+ # @param request [OpenStruct, Hash] The request object that contains all of the information used to create the API Key.
3355
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
3356
+ def update_api_key(api_key_id, request)
3357
+ start.uri('/api/api-key')
3358
+ .url_segment(api_key_id)
3359
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
3360
+ .put()
3361
+ .go()
3362
+ end
3363
+
2704
3364
  #
2705
3365
  # Updates the application with the given Id.
2706
3366
  #
@@ -2774,6 +3434,51 @@ module FusionAuth
2774
3434
  .go()
2775
3435
  end
2776
3436
 
3437
+ #
3438
+ # Updates the Entity with the given Id.
3439
+ #
3440
+ # @param entity_id [string] The Id of the Entity to update.
3441
+ # @param request [OpenStruct, Hash] The request that contains all of the new Entity information.
3442
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
3443
+ def update_entity(entity_id, request)
3444
+ start.uri('/api/entity')
3445
+ .url_segment(entity_id)
3446
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
3447
+ .put()
3448
+ .go()
3449
+ end
3450
+
3451
+ #
3452
+ # Updates the Entity Type with the given Id.
3453
+ #
3454
+ # @param entity_type_id [string] The Id of the Entity Type to update.
3455
+ # @param request [OpenStruct, Hash] The request that contains all of the new Entity Type information.
3456
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
3457
+ def update_entity_type(entity_type_id, request)
3458
+ start.uri('/api/entity/type')
3459
+ .url_segment(entity_type_id)
3460
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
3461
+ .put()
3462
+ .go()
3463
+ end
3464
+
3465
+ #
3466
+ # Updates the permission with the given id for the entity type.
3467
+ #
3468
+ # @param entity_type_id [string] The Id of the entityType that the permission belongs to.
3469
+ # @param permission_id [string] The Id of the permission to update.
3470
+ # @param request [OpenStruct, Hash] The request that contains all of the new permission information.
3471
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
3472
+ def update_entity_type_permission(entity_type_id, permission_id, request)
3473
+ start.uri('/api/entity/type')
3474
+ .url_segment(entity_type_id)
3475
+ .url_segment("permission")
3476
+ .url_segment(permission_id)
3477
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
3478
+ .put()
3479
+ .go()
3480
+ end
3481
+
2777
3482
  #
2778
3483
  # Updates the form with the given Id.
2779
3484
  #
@@ -2870,6 +3575,34 @@ module FusionAuth
2870
3575
  .go()
2871
3576
  end
2872
3577
 
3578
+ #
3579
+ # Updates the message template with the given Id.
3580
+ #
3581
+ # @param message_template_id [string] The Id of the message template to update.
3582
+ # @param request [OpenStruct, Hash] The request that contains all of the new message template information.
3583
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
3584
+ def update_message_template(message_template_id, request)
3585
+ start.uri('/api/message/template')
3586
+ .url_segment(message_template_id)
3587
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
3588
+ .put()
3589
+ .go()
3590
+ end
3591
+
3592
+ #
3593
+ # Updates the messenger with the given Id.
3594
+ #
3595
+ # @param messenger_id [string] The Id of the messenger to update.
3596
+ # @param request [OpenStruct, Hash] The request object that contains all of the new messenger information.
3597
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
3598
+ def update_messenger(messenger_id, request)
3599
+ start.uri('/api/messenger')
3600
+ .url_segment(messenger_id)
3601
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
3602
+ .put()
3603
+ .go()
3604
+ end
3605
+
2873
3606
  #
2874
3607
  # Updates the registration for the user with the given id and the application defined in the request.
2875
3608
  #
@@ -2994,6 +3727,21 @@ module FusionAuth
2994
3727
  .go()
2995
3728
  end
2996
3729
 
3730
+ #
3731
+ # Creates or updates an Entity Grant. This is when a User/Entity is granted permissions to an Entity.
3732
+ #
3733
+ # @param entity_id [string] The Id of the Entity that the User/Entity is being granted access to.
3734
+ # @param request [OpenStruct, Hash] The request object that contains all of the information used to create the Entity Grant.
3735
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
3736
+ def upsert_entity_grant(entity_id, request)
3737
+ start.uri('/api/entity')
3738
+ .url_segment(entity_id)
3739
+ .url_segment("grant")
3740
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
3741
+ .post()
3742
+ .go()
3743
+ end
3744
+
2997
3745
  #
2998
3746
  # Validates the end-user provided user_code from the user-interaction of the Device Authorization Grant.
2999
3747
  # If you build your own activation form you should validate the user provided code prior to beginning the Authorization grant.
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.22.1
4
+ version: 1.26.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: 2020-12-09 00:00:00.000000000 Z
12
+ date: 2021-04-20 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