fusionauth_client 1.29.1 → 1.32.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: cae8af7f739562d92e736f5d9ff6955ced3e3aba66171a26cf35568fa71c0f24
4
- data.tar.gz: bb6762275a129b25d654e5dba4b384986212a63f55c7103925d5c72d82b5d947
3
+ metadata.gz: e82e77f3fe4fbae9c3db8edf4efc6bdc638693d22fb78efcd776977f1949e42b
4
+ data.tar.gz: fd43866ff5d73b8f1048bb7aafa72dc116c495d5e2e63695b91bb42237d0bc27
5
5
  SHA512:
6
- metadata.gz: b73c87ad929af3a314805aecf672cef3047ea468c4300b27fa26022b9e19f35a489f2ecc375e4549115bb1751d51297b354c58ee38e602da888df3ab93ba9882
7
- data.tar.gz: 5da62fb18c3db0f538d30753e1cd5c87cafe0a9742f87f3dc7c4a4c09f1d84451630b124bad09840f6d712ede762f55cbbe85099fc6a81e936affe2e1433aba8
6
+ metadata.gz: 1b4e81a81e6dbec8c0f86f6adbca5cbbd04bc8b3a1803af6a7832cfe56c350d842086039103d8a1018bdf18d8a10d3f556475d7f9906447be1eab3227a185f59
7
+ data.tar.gz: 6a5a97fa78fe73fab998d445c9bf69c72ded58d9d228737deada14f05e67991db720efd1ef47ebafdcf5d183893f92a6cc57d277b2da9e66910569c9192a8fb5
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- fusionauth_client (1.29.1)
4
+ fusionauth_client (1.32.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/build.savant CHANGED
@@ -16,13 +16,19 @@
16
16
  savantVersion = "1.0.0"
17
17
 
18
18
  pubVersion = ""
19
- project(group: "io.fusionauth", name: "fusionauth-ruby-client", version: "1.29.1", licenses: ["ApacheV2_0"]) {
19
+ project(group: "io.fusionauth", name: "fusionauth-ruby-client", version: "1.32.0", licenses: ["ApacheV2_0"]) {
20
20
  workflow {
21
- standard()
21
+ fetch {
22
+ cache()
23
+ url(url: "https://external.savant.fusionauth.io")
24
+ }
25
+ publish {
26
+ cache()
27
+ }
22
28
  }
23
29
 
24
30
  publishWorkflow {
25
- subversion(repository: "http://svn.inversoft.org/savant")
31
+ subversion(repository: "https://external.svn.fusionauth.io", username: global.internalRepositoryUsername, password: global.internalRepositoryPassword)
26
32
  }
27
33
 
28
34
  pubVersion = project.version.toString().replaceAll('-', '.pre.')
@@ -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.29.1'
7
+ spec.version = '1.32.0'
8
8
  spec.authors = ['Brian Pontarelli', 'Daniel DeGroff']
9
9
  spec.email = %w(brian@fusionauth.io daniel@fusionauth.io)
10
10
 
@@ -71,7 +71,7 @@ module FusionAuth
71
71
  # Adds a user to an existing family. The family id must be specified.
72
72
  #
73
73
  # @param family_id [string] The id of the family.
74
- # @param request [OpenStruct, Hash] The request object that contains all of the information used to determine which user to add to the family.
74
+ # @param request [OpenStruct, Hash] The request object that contains all the information used to determine which user to add to the family.
75
75
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
76
76
  def add_user_to_family(family_id, request)
77
77
  start.uri('/api/user/family')
@@ -127,7 +127,7 @@ module FusionAuth
127
127
  #
128
128
  # Adds a comment to the user's account.
129
129
  #
130
- # @param request [OpenStruct, Hash] The request object that contains all of the information used to create the user comment.
130
+ # @param request [OpenStruct, Hash] The request object that contains all the information used to create the user comment.
131
131
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
132
132
  def comment_on_user(request)
133
133
  start.uri('/api/user/comment')
@@ -158,7 +158,7 @@ module FusionAuth
158
158
  # Creates an application. You can optionally specify an Id for the application, if not provided one will be generated.
159
159
  #
160
160
  # @param application_id [string] (Optional) The Id to use for the application. If not provided a secure random UUID will be generated.
161
- # @param request [OpenStruct, Hash] The request object that contains all of the information used to create the application.
161
+ # @param request [OpenStruct, Hash] The request object that contains all the information used to create the application.
162
162
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
163
163
  def create_application(application_id, request)
164
164
  start.uri('/api/application')
@@ -174,7 +174,7 @@ module FusionAuth
174
174
  #
175
175
  # @param application_id [string] The Id of the application to create the role on.
176
176
  # @param role_id [string] (Optional) The Id of the role. If not provided a secure random UUID will be generated.
177
- # @param request [OpenStruct, Hash] The request object that contains all of the information used to create the application role.
177
+ # @param request [OpenStruct, Hash] The request object that contains all the information used to create the application role.
178
178
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
179
179
  def create_application_role(application_id, role_id, request)
180
180
  start.uri('/api/application')
@@ -191,7 +191,7 @@ module FusionAuth
191
191
  # make changes to the FusionAuth database. When using the FusionAuth App web interface, any changes are automatically
192
192
  # written to the audit log. However, if you are accessing the API, you must write the audit logs yourself.
193
193
  #
194
- # @param request [OpenStruct, Hash] The request object that contains all of the information used to create the audit log entry.
194
+ # @param request [OpenStruct, Hash] The request object that contains all the information used to create the audit log entry.
195
195
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
196
196
  def create_audit_log(request)
197
197
  start.uri('/api/system/audit-log')
@@ -204,7 +204,7 @@ module FusionAuth
204
204
  # Creates a connector. You can optionally specify an Id for the connector, if not provided one will be generated.
205
205
  #
206
206
  # @param connector_id [string] (Optional) The Id for the connector. If not provided a secure random UUID will be generated.
207
- # @param request [OpenStruct, Hash] The request object that contains all of the information used to create the connector.
207
+ # @param request [OpenStruct, Hash] The request object that contains all the information used to create the connector.
208
208
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
209
209
  def create_connector(connector_id, request)
210
210
  start.uri('/api/connector')
@@ -218,7 +218,7 @@ module FusionAuth
218
218
  # Creates a user consent type. You can optionally specify an Id for the consent type, if not provided one will be generated.
219
219
  #
220
220
  # @param consent_id [string] (Optional) The Id for the consent. If not provided a secure random UUID will be generated.
221
- # @param request [OpenStruct, Hash] The request object that contains all of the information used to create the consent.
221
+ # @param request [OpenStruct, Hash] The request object that contains all the information used to create the consent.
222
222
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
223
223
  def create_consent(consent_id, request)
224
224
  start.uri('/api/consent')
@@ -232,7 +232,7 @@ module FusionAuth
232
232
  # Creates an email template. You can optionally specify an Id for the template, if not provided one will be generated.
233
233
  #
234
234
  # @param email_template_id [string] (Optional) The Id for the template. If not provided a secure random UUID will be generated.
235
- # @param request [OpenStruct, Hash] The request object that contains all of the information used to create the email template.
235
+ # @param request [OpenStruct, Hash] The request object that contains all the information used to create the email template.
236
236
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
237
237
  def create_email_template(email_template_id, request)
238
238
  start.uri('/api/email/template')
@@ -246,7 +246,7 @@ module FusionAuth
246
246
  # Creates an Entity. You can optionally specify an Id for the Entity. If not provided one will be generated.
247
247
  #
248
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.
249
+ # @param request [OpenStruct, Hash] The request object that contains all the information used to create the Entity.
250
250
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
251
251
  def create_entity(entity_id, request)
252
252
  start.uri('/api/entity')
@@ -260,7 +260,7 @@ module FusionAuth
260
260
  # Creates a Entity Type. You can optionally specify an Id for the Entity Type, if not provided one will be generated.
261
261
  #
262
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.
263
+ # @param request [OpenStruct, Hash] The request object that contains all the information used to create the Entity Type.
264
264
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
265
265
  def create_entity_type(entity_type_id, request)
266
266
  start.uri('/api/entity/type')
@@ -276,7 +276,7 @@ module FusionAuth
276
276
  #
277
277
  # @param entity_type_id [string] The Id of the entity type to create the permission on.
278
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.
279
+ # @param request [OpenStruct, Hash] The request object that contains all the information used to create the permission.
280
280
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
281
281
  def create_entity_type_permission(entity_type_id, permission_id, request)
282
282
  start.uri('/api/entity/type')
@@ -293,7 +293,7 @@ module FusionAuth
293
293
  # family, if not provided one will be generated.
294
294
  #
295
295
  # @param family_id [string] (Optional) The id for the family. If not provided a secure random UUID will be generated.
296
- # @param request [OpenStruct, Hash] The request object that contains all of the information used to create the family.
296
+ # @param request [OpenStruct, Hash] The request object that contains all the information used to create the family.
297
297
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
298
298
  def create_family(family_id, request)
299
299
  start.uri('/api/user/family')
@@ -307,7 +307,7 @@ module FusionAuth
307
307
  # Creates a form. You can optionally specify an Id for the form, if not provided one will be generated.
308
308
  #
309
309
  # @param form_id [string] (Optional) The Id for the form. If not provided a secure random UUID will be generated.
310
- # @param request [OpenStruct, Hash] The request object that contains all of the information used to create the form.
310
+ # @param request [OpenStruct, Hash] The request object that contains all the information used to create the form.
311
311
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
312
312
  def create_form(form_id, request)
313
313
  start.uri('/api/form')
@@ -321,7 +321,7 @@ module FusionAuth
321
321
  # Creates a form field. You can optionally specify an Id for the form, if not provided one will be generated.
322
322
  #
323
323
  # @param field_id [string] (Optional) The Id for the form field. If not provided a secure random UUID will be generated.
324
- # @param request [OpenStruct, Hash] The request object that contains all of the information used to create the form field.
324
+ # @param request [OpenStruct, Hash] The request object that contains all the information used to create the form field.
325
325
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
326
326
  def create_form_field(field_id, request)
327
327
  start.uri('/api/form/field')
@@ -335,7 +335,7 @@ module FusionAuth
335
335
  # Creates a group. You can optionally specify an Id for the group, if not provided one will be generated.
336
336
  #
337
337
  # @param group_id [string] (Optional) The Id for the group. If not provided a secure random UUID will be generated.
338
- # @param request [OpenStruct, Hash] The request object that contains all of the information used to create the group.
338
+ # @param request [OpenStruct, Hash] The request object that contains all the information used to create the group.
339
339
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
340
340
  def create_group(group_id, request)
341
341
  start.uri('/api/group')
@@ -348,7 +348,7 @@ module FusionAuth
348
348
  #
349
349
  # Creates a member in a group.
350
350
  #
351
- # @param request [OpenStruct, Hash] The request object that contains all of the information used to create the group member(s).
351
+ # @param request [OpenStruct, Hash] The request object that contains all the information used to create the group member(s).
352
352
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
353
353
  def create_group_members(request)
354
354
  start.uri('/api/group/member')
@@ -357,11 +357,25 @@ module FusionAuth
357
357
  .go()
358
358
  end
359
359
 
360
+ #
361
+ # Creates an IP Access Control List. You can optionally specify an Id on this create request, if one is not provided one will be generated.
362
+ #
363
+ # @param access_control_list_id [string] (Optional) The Id for the IP Access Control List. If not provided a secure random UUID will be generated.
364
+ # @param request [OpenStruct, Hash] The request object that contains all the information used to create the IP Access Control List.
365
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
366
+ def create_ip_access_control_list(access_control_list_id, request)
367
+ start.uri('/api/ip-acl')
368
+ .url_segment(access_control_list_id)
369
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
370
+ .post()
371
+ .go()
372
+ end
373
+
360
374
  #
361
375
  # Creates an identity provider. You can optionally specify an Id for the identity provider, if not provided one will be generated.
362
376
  #
363
377
  # @param identity_provider_id [string] (Optional) The Id of the identity provider. If not provided a secure random UUID will be generated.
364
- # @param request [OpenStruct, Hash] The request object that contains all of the information used to create the identity provider.
378
+ # @param request [OpenStruct, Hash] The request object that contains all the information used to create the identity provider.
365
379
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
366
380
  def create_identity_provider(identity_provider_id, request)
367
381
  start.uri('/api/identity-provider')
@@ -375,7 +389,7 @@ module FusionAuth
375
389
  # Creates a Lambda. You can optionally specify an Id for the lambda, if not provided one will be generated.
376
390
  #
377
391
  # @param lambda_id [string] (Optional) The Id for the lambda. If not provided a secure random UUID will be generated.
378
- # @param request [OpenStruct, Hash] The request object that contains all of the information used to create the lambda.
392
+ # @param request [OpenStruct, Hash] The request object that contains all the information used to create the lambda.
379
393
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
380
394
  def create_lambda(lambda_id, request)
381
395
  start.uri('/api/lambda')
@@ -389,7 +403,7 @@ module FusionAuth
389
403
  # Creates an message template. You can optionally specify an Id for the template, if not provided one will be generated.
390
404
  #
391
405
  # @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.
406
+ # @param request [OpenStruct, Hash] The request object that contains all the information used to create the message template.
393
407
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
394
408
  def create_message_template(message_template_id, request)
395
409
  start.uri('/api/message/template')
@@ -403,7 +417,7 @@ module FusionAuth
403
417
  # Creates a messenger. You can optionally specify an Id for the messenger, if not provided one will be generated.
404
418
  #
405
419
  # @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.
420
+ # @param request [OpenStruct, Hash] The request object that contains all the information used to create the messenger.
407
421
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
408
422
  def create_messenger(messenger_id, request)
409
423
  start.uri('/api/messenger')
@@ -417,7 +431,7 @@ module FusionAuth
417
431
  # Creates a tenant. You can optionally specify an Id for the tenant, if not provided one will be generated.
418
432
  #
419
433
  # @param tenant_id [string] (Optional) The Id for the tenant. If not provided a secure random UUID will be generated.
420
- # @param request [OpenStruct, Hash] The request object that contains all of the information used to create the tenant.
434
+ # @param request [OpenStruct, Hash] The request object that contains all the information used to create the tenant.
421
435
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
422
436
  def create_tenant(tenant_id, request)
423
437
  start.uri('/api/tenant')
@@ -431,7 +445,7 @@ module FusionAuth
431
445
  # Creates a Theme. You can optionally specify an Id for the theme, if not provided one will be generated.
432
446
  #
433
447
  # @param theme_id [string] (Optional) The Id for the theme. If not provided a secure random UUID will be generated.
434
- # @param request [OpenStruct, Hash] The request object that contains all of the information used to create the theme.
448
+ # @param request [OpenStruct, Hash] The request object that contains all the information used to create the theme.
435
449
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
436
450
  def create_theme(theme_id, request)
437
451
  start.uri('/api/theme')
@@ -445,7 +459,7 @@ module FusionAuth
445
459
  # Creates a user. You can optionally specify an Id for the user, if not provided one will be generated.
446
460
  #
447
461
  # @param user_id [string] (Optional) The Id for the user. If not provided a secure random UUID will be generated.
448
- # @param request [OpenStruct, Hash] The request object that contains all of the information used to create the user.
462
+ # @param request [OpenStruct, Hash] The request object that contains all the information used to create the user.
449
463
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
450
464
  def create_user(user_id, request)
451
465
  start.uri('/api/user')
@@ -460,7 +474,7 @@ module FusionAuth
460
474
  # that the user action can be applied to any user.
461
475
  #
462
476
  # @param user_action_id [string] (Optional) The Id for the user action. If not provided a secure random UUID will be generated.
463
- # @param request [OpenStruct, Hash] The request object that contains all of the information used to create the user action.
477
+ # @param request [OpenStruct, Hash] The request object that contains all the information used to create the user action.
464
478
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
465
479
  def create_user_action(user_action_id, request)
466
480
  start.uri('/api/user-action')
@@ -475,7 +489,7 @@ module FusionAuth
475
489
  # successfully. Anytime after that the user action reason can be used.
476
490
  #
477
491
  # @param user_action_reason_id [string] (Optional) The Id for the user action reason. If not provided a secure random UUID will be generated.
478
- # @param request [OpenStruct, Hash] The request object that contains all of the information used to create the user action reason.
492
+ # @param request [OpenStruct, Hash] The request object that contains all the information used to create the user action reason.
479
493
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
480
494
  def create_user_action_reason(user_action_reason_id, request)
481
495
  start.uri('/api/user-action-reason')
@@ -502,7 +516,7 @@ module FusionAuth
502
516
  #
503
517
  # Link an external user from a 3rd party identity provider to a FusionAuth user.
504
518
  #
505
- # @param request [OpenStruct, Hash] The request object that contains all of the information used to link the FusionAuth user.
519
+ # @param request [OpenStruct, Hash] The request object that contains all the information used to link the FusionAuth user.
506
520
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
507
521
  def create_user_link(request)
508
522
  start.uri('/api/identity-provider/link')
@@ -515,7 +529,7 @@ module FusionAuth
515
529
  # Creates a webhook. You can optionally specify an Id for the webhook, if not provided one will be generated.
516
530
  #
517
531
  # @param webhook_id [string] (Optional) The Id for the webhook. If not provided a secure random UUID will be generated.
518
- # @param request [OpenStruct, Hash] The request object that contains all of the information used to create the webhook.
532
+ # @param request [OpenStruct, Hash] The request object that contains all the information used to create the webhook.
519
533
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
520
534
  def create_webhook(webhook_id, request)
521
535
  start.uri('/api/webhook')
@@ -785,6 +799,18 @@ module FusionAuth
785
799
  .go()
786
800
  end
787
801
 
802
+ #
803
+ # Deletes the IP Access Control List for the given Id.
804
+ #
805
+ # @param ip_access_control_list_id [string] The Id of the IP Access Control List to delete.
806
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
807
+ def delete_ip_access_control_list(ip_access_control_list_id)
808
+ start.uri('/api/ip-acl')
809
+ .url_segment(ip_access_control_list_id)
810
+ .delete()
811
+ .go()
812
+ end
813
+
788
814
  #
789
815
  # Deletes the identity provider for the given Id.
790
816
  #
@@ -860,7 +886,24 @@ module FusionAuth
860
886
  end
861
887
 
862
888
  #
863
- # Deletes the tenant for the given Id.
889
+ # Deletes the user registration for the given user and application along with the given JSON body that contains the event information.
890
+ #
891
+ # @param user_id [string] The Id of the user whose registration is being deleted.
892
+ # @param application_id [string] The Id of the application to remove the registration for.
893
+ # @param request [OpenStruct, Hash] The request body that contains the event information.
894
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
895
+ def delete_registration_with_request(user_id, application_id, request)
896
+ start.uri('/api/user/registration')
897
+ .url_segment(user_id)
898
+ .url_segment(application_id)
899
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
900
+ .delete()
901
+ .go()
902
+ end
903
+
904
+ #
905
+ # Deletes the tenant based on the given Id on the URL. This permanently deletes all information, metrics, reports and data associated
906
+ # with the tenant and everything under the tenant (applications, users, etc).
864
907
  #
865
908
  # @param tenant_id [string] The Id of the tenant to delete.
866
909
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
@@ -885,6 +928,21 @@ module FusionAuth
885
928
  .go()
886
929
  end
887
930
 
931
+ #
932
+ # Deletes the tenant based on the given request (sent to the API as JSON). This permanently deletes all information, metrics, reports and data associated
933
+ # with the tenant and everything under the tenant (applications, users, etc).
934
+ #
935
+ # @param tenant_id [string] The Id of the tenant to delete.
936
+ # @param request [OpenStruct, Hash] The request object that contains all the information used to delete the user.
937
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
938
+ def delete_tenant_with_request(tenant_id, request)
939
+ start.uri('/api/tenant')
940
+ .url_segment(tenant_id)
941
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
942
+ .delete()
943
+ .go()
944
+ end
945
+
888
946
  #
889
947
  # Deletes the theme for the given Id.
890
948
  #
@@ -953,6 +1011,21 @@ module FusionAuth
953
1011
  .go()
954
1012
  end
955
1013
 
1014
+ #
1015
+ # Deletes the user based on the given request (sent to the API as JSON). This permanently deletes all information, metrics, reports and data associated
1016
+ # with the user.
1017
+ #
1018
+ # @param user_id [string] The Id of the user to delete (required).
1019
+ # @param request [OpenStruct, Hash] The request object that contains all the information used to delete the user.
1020
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
1021
+ def delete_user_with_request(user_id, request)
1022
+ start.uri('/api/user')
1023
+ .url_segment(user_id)
1024
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
1025
+ .delete()
1026
+ .go()
1027
+ end
1028
+
956
1029
  #
957
1030
  # Deletes the users with the given ids, or users matching the provided JSON query or queryString.
958
1031
  # The order of preference is ids, query and then queryString, it is recommended to only provide one of the three for the request.
@@ -1007,13 +1080,27 @@ module FusionAuth
1007
1080
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
1008
1081
  def disable_two_factor(user_id, method_id, code)
1009
1082
  start.uri('/api/user/two-factor')
1010
- .url_parameter('userId', user_id)
1083
+ .url_segment(user_id)
1011
1084
  .url_parameter('methodId', method_id)
1012
1085
  .url_parameter('code', code)
1013
1086
  .delete()
1014
1087
  .go()
1015
1088
  end
1016
1089
 
1090
+ #
1091
+ # Disable Two Factor authentication for a user using a JSON body rather than URL parameters.
1092
+ #
1093
+ # @param user_id [string] The Id of the User for which you're disabling Two Factor authentication.
1094
+ # @param request [OpenStruct, Hash] The request information that contains the code and methodId along with any event information.
1095
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
1096
+ def disable_two_factor_with_request(user_id, request)
1097
+ start.uri('/api/user/two-factor')
1098
+ .url_segment(user_id)
1099
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
1100
+ .delete()
1101
+ .go()
1102
+ end
1103
+
1017
1104
  #
1018
1105
  # Enable Two Factor authentication for a user.
1019
1106
  #
@@ -1170,7 +1257,7 @@ module FusionAuth
1170
1257
  # Generate a new RSA or EC key pair or an HMAC secret.
1171
1258
  #
1172
1259
  # @param key_id [string] (Optional) The Id for the key. If not provided a secure random UUID will be generated.
1173
- # @param request [OpenStruct, Hash] The request object that contains all of the information used to create the key.
1260
+ # @param request [OpenStruct, Hash] The request object that contains all the information used to create the key.
1174
1261
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
1175
1262
  def generate_key(key_id, request)
1176
1263
  start.uri('/api/key/generate')
@@ -1252,7 +1339,7 @@ module FusionAuth
1252
1339
  # Import an existing RSA or EC key pair or an HMAC secret.
1253
1340
  #
1254
1341
  # @param key_id [string] (Optional) The Id for the key. If not provided a secure random UUID will be generated.
1255
- # @param request [OpenStruct, Hash] The request object that contains all of the information used to create the key.
1342
+ # @param request [OpenStruct, Hash] The request object that contains all the information used to create the key.
1256
1343
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
1257
1344
  def import_key(key_id, request)
1258
1345
  start.uri('/api/key/import')
@@ -1391,6 +1478,19 @@ module FusionAuth
1391
1478
  .go()
1392
1479
  end
1393
1480
 
1481
+ #
1482
+ # The Logout API is intended to be used to remove the refresh token and access token cookies if they exist on the
1483
+ # client and revoke the refresh token stored. This API takes the refresh token in the JSON body.
1484
+ #
1485
+ # @param request [OpenStruct, Hash] The request object that contains all the information used to logout the user.
1486
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
1487
+ def logout_with_request(request)
1488
+ startAnonymous.uri('/api/logout')
1489
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
1490
+ .post()
1491
+ .go()
1492
+ end
1493
+
1394
1494
  #
1395
1495
  # Retrieves the identity provider for the given domain. A 200 response code indicates the domain is managed
1396
1496
  # by a registered identity provider. A 404 indicates the domain is not managed.
@@ -2248,6 +2348,18 @@ module FusionAuth
2248
2348
  .go()
2249
2349
  end
2250
2350
 
2351
+ #
2352
+ # Retrieves the IP Access Control List with the given Id.
2353
+ #
2354
+ # @param ip_access_control_list_id [string] The Id of the IP Access Control List.
2355
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
2356
+ def retrieve_ip_access_control_list(ip_access_control_list_id)
2357
+ start.uri('/api/ip-acl')
2358
+ .url_segment(ip_access_control_list_id)
2359
+ .get()
2360
+ .go()
2361
+ end
2362
+
2251
2363
  #
2252
2364
  # Retrieves the identity provider for the given id or all of the identity providers if the id is null.
2253
2365
  #
@@ -2582,6 +2694,16 @@ module FusionAuth
2582
2694
  .go()
2583
2695
  end
2584
2696
 
2697
+ #
2698
+ # Retrieves the FusionAuth Reactor metrics.
2699
+ #
2700
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
2701
+ def retrieve_reactor_metrics()
2702
+ start.uri('/api/reactor/metrics')
2703
+ .get()
2704
+ .go()
2705
+ end
2706
+
2585
2707
  #
2586
2708
  # Retrieves the FusionAuth Reactor status.
2587
2709
  #
@@ -3146,6 +3268,19 @@ module FusionAuth
3146
3268
  .go()
3147
3269
  end
3148
3270
 
3271
+ #
3272
+ # Revokes refresh tokens using the information in the JSON body. The handling for this method is the same as the revokeRefreshToken method
3273
+ # and is based on the information you provide in the RefreshDeleteRequest object. See that method for additional information.
3274
+ #
3275
+ # @param request [OpenStruct, Hash] The request information used to revoke the refresh tokens.
3276
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
3277
+ def revoke_refresh_tokens_with_request(request)
3278
+ start.uri('/api/jwt/refresh')
3279
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
3280
+ .delete()
3281
+ .go()
3282
+ end
3283
+
3149
3284
  #
3150
3285
  # Revokes a single User consent by Id.
3151
3286
  #
@@ -3230,6 +3365,18 @@ module FusionAuth
3230
3365
  .go()
3231
3366
  end
3232
3367
 
3368
+ #
3369
+ # Searches the IP Access Control Lists with the specified criteria and pagination.
3370
+ #
3371
+ # @param request [OpenStruct, Hash] The search criteria and pagination information.
3372
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
3373
+ def search_ip_access_control_lists(request)
3374
+ start.uri('/api/ip-acl/search')
3375
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
3376
+ .post()
3377
+ .go()
3378
+ end
3379
+
3233
3380
  #
3234
3381
  # Searches the login records with the specified criteria and pagination.
3235
3382
  #
@@ -3336,7 +3483,7 @@ module FusionAuth
3336
3483
  #
3337
3484
  # Send a Two Factor authentication code to assist in setting up Two Factor authentication or disabling.
3338
3485
  #
3339
- # @param request [OpenStruct, Hash] The request object that contains all of the information used to send the code.
3486
+ # @param request [OpenStruct, Hash] The request object that contains all the information used to send the code.
3340
3487
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
3341
3488
  # @deprecated This method has been renamed to send_two_factor_code_for_enable_disable, use that method instead.
3342
3489
  def send_two_factor_code(request)
@@ -3349,7 +3496,7 @@ module FusionAuth
3349
3496
  #
3350
3497
  # Send a Two Factor authentication code to assist in setting up Two Factor authentication or disabling.
3351
3498
  #
3352
- # @param request [OpenStruct, Hash] The request object that contains all of the information used to send the code.
3499
+ # @param request [OpenStruct, Hash] The request object that contains all the information used to send the code.
3353
3500
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
3354
3501
  def send_two_factor_code_for_enable_disable(request)
3355
3502
  start.uri('/api/two-factor/send')
@@ -3444,7 +3591,7 @@ module FusionAuth
3444
3591
  # Updates an API key by given id
3445
3592
  #
3446
3593
  # @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.
3594
+ # @param request [OpenStruct, Hash] The request object that contains all the information used to create the API Key.
3448
3595
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
3449
3596
  def update_api_key(api_key_id, request)
3450
3597
  start.uri('/api/api-key')
@@ -3614,6 +3761,20 @@ module FusionAuth
3614
3761
  .go()
3615
3762
  end
3616
3763
 
3764
+ #
3765
+ # Updates the IP Access Control List with the given Id.
3766
+ #
3767
+ # @param access_control_list_id [string] The Id of the IP Access Control List to update.
3768
+ # @param request [OpenStruct, Hash] The request that contains all of the new IP Access Control List information.
3769
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
3770
+ def update_ip_access_control_list(access_control_list_id, request)
3771
+ start.uri('/api/ip-acl')
3772
+ .url_segment(access_control_list_id)
3773
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
3774
+ .put()
3775
+ .go()
3776
+ end
3777
+
3617
3778
  #
3618
3779
  # Updates the identity provider with the given Id.
3619
3780
  #
@@ -3824,7 +3985,7 @@ module FusionAuth
3824
3985
  # Creates or updates an Entity Grant. This is when a User/Entity is granted permissions to an Entity.
3825
3986
  #
3826
3987
  # @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.
3988
+ # @param request [OpenStruct, Hash] The request object that contains all the information used to create the Entity Grant.
3828
3989
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
3829
3990
  def upsert_entity_grant(entity_id, request)
3830
3991
  start.uri('/api/entity')
@@ -3865,6 +4026,26 @@ module FusionAuth
3865
4026
  .go()
3866
4027
  end
3867
4028
 
4029
+ #
4030
+ # It's a JWT vending machine!
4031
+ #
4032
+ # Issue a new access token (JWT) with the provided claims in the request. This JWT is not scoped to a tenant or user, it is a free form
4033
+ # token that will contain what claims you provide.
4034
+ # <p>
4035
+ # The iat, exp and jti claims will be added by FusionAuth, all other claims must be provided by the caller.
4036
+ #
4037
+ # If a TTL is not provided in the request, the TTL will be retrieved from the default Tenant or the Tenant specified on the request either
4038
+ # by way of the X-FusionAuth-TenantId request header, or a tenant scoped API key.
4039
+ #
4040
+ # @param request [OpenStruct, Hash] The request that contains all of the claims for this JWT.
4041
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
4042
+ def vend_jwt(request)
4043
+ start.uri('/api/jwt/vend')
4044
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
4045
+ .post()
4046
+ .go()
4047
+ end
4048
+
3868
4049
  #
3869
4050
  # Confirms a email verification. The Id given is usually from an email sent to the user.
3870
4051
  #
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.29.1
4
+ version: 1.32.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-07-26 00:00:00.000000000 Z
12
+ date: 2021-12-10 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.