fusionauth_client 1.57.0 → 1.58.1

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.
Binary file
Binary file
@@ -1338,6 +1338,16 @@
1338
1338
  —
1339
1339
  <span class="container">FusionAuth::FusionAuthClient</span>
1340
1340
 
1341
+ <li class="method">
1342
+ <a href="FusionAuth/FusionAuthClient.html#method-i-retrieve_webhook_attempt_log">#retrieve_webhook_attempt_log</a>
1343
+ &mdash;
1344
+ <span class="container">FusionAuth::FusionAuthClient</span>
1345
+
1346
+ <li class="method">
1347
+ <a href="FusionAuth/FusionAuthClient.html#method-i-retrieve_webhook_event_log">#retrieve_webhook_event_log</a>
1348
+ &mdash;
1349
+ <span class="container">FusionAuth::FusionAuthClient</span>
1350
+
1341
1351
  <li class="method">
1342
1352
  <a href="FusionAuth/FusionAuthClient.html#method-i-retrieve_webhooks">#retrieve_webhooks</a>
1343
1353
  &mdash;
@@ -1498,6 +1508,11 @@
1498
1508
  &mdash;
1499
1509
  <span class="container">FusionAuth::FusionAuthClient</span>
1500
1510
 
1511
+ <li class="method">
1512
+ <a href="FusionAuth/FusionAuthClient.html#method-i-search_webhook_event_logs">#search_webhook_event_logs</a>
1513
+ &mdash;
1514
+ <span class="container">FusionAuth::FusionAuthClient</span>
1515
+
1501
1516
  <li class="method">
1502
1517
  <a href="FusionAuth/FusionAuthClient.html#method-i-search_webhooks">#search_webhooks</a>
1503
1518
  &mdash;
@@ -19,7 +19,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
19
19
 
20
20
  Gem::Specification.new do |spec|
21
21
  spec.name = 'fusionauth_client'
22
- spec.version = '1.57.0'
22
+ spec.version = '1.58.1'
23
23
  spec.authors = ['Brian Pontarelli', 'Daniel DeGroff']
24
24
  spec.email = %w(brian@fusionauth.io daniel@fusionauth.io)
25
25
 
@@ -2,7 +2,7 @@ require 'ostruct'
2
2
  require 'fusionauth/rest_client'
3
3
 
4
4
  #
5
- # Copyright (c) 2018-2023, FusionAuth, All Rights Reserved
5
+ # Copyright (c) 2018-2025, FusionAuth, All Rights Reserved
6
6
  #
7
7
  # Licensed under the Apache License, Version 2.0 (the "License");
8
8
  # you may not use this file except in compliance with the License.
@@ -134,6 +134,24 @@ module FusionAuth
134
134
  .go
135
135
  end
136
136
 
137
+ #
138
+ # Changes a user's password using their access token (JWT) instead of the changePasswordId
139
+ # A common use case for this method will be if you want to allow the user to change their own password.
140
+ #
141
+ # Remember to send refreshToken in the request body if you want to get a new refresh token when login using the returned oneTimePassword.
142
+ #
143
+ # @param encoded_jwt [string] The encoded JWT (access token).
144
+ # @param request [OpenStruct, Hash] The change password request that contains all the information used to change the password.
145
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
146
+ # @deprecated This method has been renamed to change_password_using_jwt, use that method instead.
147
+ def change_password_by_jwt(encoded_jwt, request)
148
+ startAnonymous.uri('/api/user/change-password')
149
+ .authorization('Bearer ' + encoded_jwt)
150
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
151
+ .post
152
+ .go
153
+ end
154
+
137
155
  #
138
156
  # Changes a user's password using their identity (loginId and password). Using a loginId instead of the changePasswordId
139
157
  # bypasses the email verification and allows a password to be changed directly without first calling the #forgotPassword
@@ -148,6 +166,23 @@ module FusionAuth
148
166
  .go
149
167
  end
150
168
 
169
+ #
170
+ # Changes a user's password using their access token (JWT) instead of the changePasswordId
171
+ # A common use case for this method will be if you want to allow the user to change their own password.
172
+ #
173
+ # Remember to send refreshToken in the request body if you want to get a new refresh token when login using the returned oneTimePassword.
174
+ #
175
+ # @param encoded_jwt [string] The encoded JWT (access token).
176
+ # @param request [OpenStruct, Hash] The change password request that contains all the information used to change the password.
177
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
178
+ def change_password_using_jwt(encoded_jwt, request)
179
+ startAnonymous.uri('/api/user/change-password')
180
+ .authorization('Bearer ' + encoded_jwt)
181
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
182
+ .post
183
+ .go
184
+ end
185
+
151
186
  #
152
187
  # Check to see if the user must obtain a Trust Token Id in order to complete a change password request.
153
188
  # When a user has enabled Two-Factor authentication, before you are allowed to use the Change Password API to change
@@ -734,7 +769,7 @@ module FusionAuth
734
769
  end
735
770
 
736
771
  #
737
- # Deactivates the users with the given ids.
772
+ # Deactivates the users with the given Ids.
738
773
  #
739
774
  # @param user_ids [Array] The ids of the users to deactivate.
740
775
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
@@ -749,7 +784,7 @@ module FusionAuth
749
784
  end
750
785
 
751
786
  #
752
- # Deactivates the users with the given ids.
787
+ # Deactivates the users with the given Ids.
753
788
  #
754
789
  # @param user_ids [Array] The ids of the users to deactivate.
755
790
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
@@ -1191,8 +1226,8 @@ module FusionAuth
1191
1226
  end
1192
1227
 
1193
1228
  #
1194
- # Deletes the users with the given ids, or users matching the provided JSON query or queryString.
1195
- # The order of preference is ids, query and then queryString, it is recommended to only provide one of the three for the request.
1229
+ # Deletes the users with the given Ids, or users matching the provided JSON query or queryString.
1230
+ # The order of preference is Ids, query and then queryString, it is recommended to only provide one of the three for the request.
1196
1231
  #
1197
1232
  # This method can be used to deactivate or permanently delete (hard-delete) users based upon the hardDelete boolean in the request body.
1198
1233
  # Using the dryRun parameter you may also request the result of the action without actually deleting or deactivating any users.
@@ -1208,8 +1243,8 @@ module FusionAuth
1208
1243
  end
1209
1244
 
1210
1245
  #
1211
- # Deletes the users with the given ids, or users matching the provided JSON query or queryString.
1212
- # The order of preference is ids, query and then queryString, it is recommended to only provide one of the three for the request.
1246
+ # Deletes the users with the given Ids, or users matching the provided JSON query or queryString.
1247
+ # The order of preference is Ids, query and then queryString, it is recommended to only provide one of the three for the request.
1213
1248
  #
1214
1249
  # This method can be used to deactivate or permanently delete (hard-delete) users based upon the hardDelete boolean in the request body.
1215
1250
  # Using the dryRun parameter you may also request the result of the action without actually deleting or deactivating any users.
@@ -1730,7 +1765,7 @@ module FusionAuth
1730
1765
  # Modifies a temporal user action by changing the expiration of the action and optionally adding a comment to the
1731
1766
  # action.
1732
1767
  #
1733
- # @param action_id [string] The Id of the action to modify. This is technically the user action log id.
1768
+ # @param action_id [string] The Id of the action to modify. This is technically the user action log Id.
1734
1769
  # @param request [OpenStruct, Hash] The request that contains all the information about the modification.
1735
1770
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
1736
1771
  def modify_action(action_id, request)
@@ -1754,16 +1789,16 @@ module FusionAuth
1754
1789
  end
1755
1790
 
1756
1791
  #
1757
- # Updates an authentication API key by given id
1792
+ # Updates an API key with the given Id.
1758
1793
  #
1759
- # @param key_id [string] The Id of the authentication key. If not provided a secure random api key will be generated.
1760
- # @param request [OpenStruct, Hash] The request object that contains all the information needed to create the APIKey.
1794
+ # @param key_id [string] The Id of the API key. If not provided a secure random api key will be generated.
1795
+ # @param request [OpenStruct, Hash] The request object that contains all the information needed to create the API key.
1761
1796
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
1762
1797
  def patch_api_key(key_id, request)
1763
1798
  start.uri('/api/api-key')
1764
1799
  .url_segment(key_id)
1765
1800
  .body_handler(FusionAuth::JSONBodyHandler.new(request))
1766
- .post
1801
+ .patch
1767
1802
  .go
1768
1803
  end
1769
1804
 
@@ -2272,7 +2307,7 @@ module FusionAuth
2272
2307
  end
2273
2308
 
2274
2309
  #
2275
- # Removes a user from the family with the given id.
2310
+ # Removes a user from the family with the given Id.
2276
2311
  #
2277
2312
  # @param family_id [string] The Id of the family to remove the user from.
2278
2313
  # @param user_id [string] The Id of the user to remove from the family.
@@ -2327,7 +2362,7 @@ module FusionAuth
2327
2362
  end
2328
2363
 
2329
2364
  #
2330
- # Retrieves an authentication API key for the given id
2365
+ # Retrieves an authentication API key for the given Id.
2331
2366
  #
2332
2367
  # @param key_id [string] The Id of the API key to retrieve.
2333
2368
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
@@ -2393,7 +2428,7 @@ module FusionAuth
2393
2428
  #
2394
2429
  # Retrieves the application for the given Id or all the applications if the Id is null.
2395
2430
  #
2396
- # @param application_id [string] (Optional) The application id.
2431
+ # @param application_id [string] (Optional) The application Id.
2397
2432
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
2398
2433
  def retrieve_application(application_id)
2399
2434
  start.uri('/api/application')
@@ -2469,10 +2504,10 @@ module FusionAuth
2469
2504
  end
2470
2505
 
2471
2506
  #
2472
- # Retrieves the daily active user report between the two instants. If you specify an application id, it will only
2507
+ # Retrieves the daily active user report between the two instants. If you specify an application Id, it will only
2473
2508
  # return the daily active counts for that application.
2474
2509
  #
2475
- # @param application_id [string] (Optional) The application id.
2510
+ # @param application_id [string] (Optional) The application Id.
2476
2511
  # @param start [OpenStruct, Hash] The start instant as UTC milliseconds since Epoch.
2477
2512
  # @param _end [OpenStruct, Hash] The end instant as UTC milliseconds since Epoch.
2478
2513
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
@@ -2486,7 +2521,7 @@ module FusionAuth
2486
2521
  end
2487
2522
 
2488
2523
  #
2489
- # Retrieves the email template for the given Id. If you don't specify the id, this will return all the email templates.
2524
+ # Retrieves the email template for the given Id. If you don't specify the Id, this will return all the email templates.
2490
2525
  #
2491
2526
  # @param email_template_id [string] (Optional) The Id of the email template.
2492
2527
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
@@ -2869,10 +2904,10 @@ module FusionAuth
2869
2904
  end
2870
2905
 
2871
2906
  #
2872
- # Retrieves the login report between the two instants. If you specify an application id, it will only return the
2907
+ # Retrieves the login report between the two instants. If you specify an application Id, it will only return the
2873
2908
  # login counts for that application.
2874
2909
  #
2875
- # @param application_id [string] (Optional) The application id.
2910
+ # @param application_id [string] (Optional) The application Id.
2876
2911
  # @param start [OpenStruct, Hash] The start instant as UTC milliseconds since Epoch.
2877
2912
  # @param _end [OpenStruct, Hash] The end instant as UTC milliseconds since Epoch.
2878
2913
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
@@ -2886,7 +2921,7 @@ module FusionAuth
2886
2921
  end
2887
2922
 
2888
2923
  #
2889
- # Retrieves the message template for the given Id. If you don't specify the id, this will return all the message templates.
2924
+ # Retrieves the message template for the given Id. If you don't specify the Id, this will return all the message templates.
2890
2925
  #
2891
2926
  # @param message_template_id [string] (Optional) The Id of the message template.
2892
2927
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
@@ -2942,10 +2977,10 @@ module FusionAuth
2942
2977
  end
2943
2978
 
2944
2979
  #
2945
- # Retrieves the monthly active user report between the two instants. If you specify an application id, it will only
2980
+ # Retrieves the monthly active user report between the two instants. If you specify an application Id, it will only
2946
2981
  # return the monthly active counts for that application.
2947
2982
  #
2948
- # @param application_id [string] (Optional) The application id.
2983
+ # @param application_id [string] (Optional) The application Id.
2949
2984
  # @param start [OpenStruct, Hash] The start instant as UTC milliseconds since Epoch.
2950
2985
  # @param _end [OpenStruct, Hash] The end instant as UTC milliseconds since Epoch.
2951
2986
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
@@ -3108,7 +3143,7 @@ module FusionAuth
3108
3143
  end
3109
3144
 
3110
3145
  #
3111
- # Retrieves the user registration for the user with the given Id and the given application id.
3146
+ # Retrieves the user registration for the user with the given Id and the given application Id.
3112
3147
  #
3113
3148
  # @param user_id [string] The Id of the user.
3114
3149
  # @param application_id [string] The Id of the application.
@@ -3122,10 +3157,10 @@ module FusionAuth
3122
3157
  end
3123
3158
 
3124
3159
  #
3125
- # Retrieves the registration report between the two instants. If you specify an application id, it will only return
3160
+ # Retrieves the registration report between the two instants. If you specify an application Id, it will only return
3126
3161
  # the registration counts for that application.
3127
3162
  #
3128
- # @param application_id [string] (Optional) The application id.
3163
+ # @param application_id [string] (Optional) The application Id.
3129
3164
  # @param start [OpenStruct, Hash] The start instant as UTC milliseconds since Epoch.
3130
3165
  # @param _end [OpenStruct, Hash] The end instant as UTC milliseconds since Epoch.
3131
3166
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
@@ -3288,7 +3323,7 @@ module FusionAuth
3288
3323
  end
3289
3324
 
3290
3325
  #
3291
- # Retrieves the user action for the given Id. If you pass in null for the id, this will return all the user
3326
+ # Retrieves the user action for the given Id. If you pass in null for the Id, this will return all the user
3292
3327
  # actions.
3293
3328
  #
3294
3329
  # @param user_action_id [string] (Optional) The Id of the user action.
@@ -3301,7 +3336,7 @@ module FusionAuth
3301
3336
  end
3302
3337
 
3303
3338
  #
3304
- # Retrieves the user action reason for the given Id. If you pass in null for the id, this will return all the user
3339
+ # Retrieves the user action reason for the given Id. If you pass in null for the Id, this will return all the user
3305
3340
  # action reasons.
3306
3341
  #
3307
3342
  # @param user_action_reason_id [string] (Optional) The Id of the user action reason.
@@ -3400,8 +3435,8 @@ module FusionAuth
3400
3435
  #
3401
3436
  # This API is useful if you want to build your own login workflow to complete a device grant.
3402
3437
  #
3403
- # @param client_id [string] The client id.
3404
- # @param client_secret [string] The client id.
3438
+ # @param client_id [string] The client Id.
3439
+ # @param client_secret [string] The client Id.
3405
3440
  # @param user_code [string] The end-user verification code.
3406
3441
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
3407
3442
  def retrieve_user_code(client_id, client_secret, user_code)
@@ -3514,11 +3549,11 @@ module FusionAuth
3514
3549
  end
3515
3550
 
3516
3551
  #
3517
- # 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
3552
+ # 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
3518
3553
  # login counts for that application.
3519
3554
  #
3520
- # @param application_id [string] (Optional) The application id.
3521
- # @param user_id [string] The userId id.
3555
+ # @param application_id [string] (Optional) The application Id.
3556
+ # @param user_id [string] The userId Id.
3522
3557
  # @param start [OpenStruct, Hash] The start instant as UTC milliseconds since Epoch.
3523
3558
  # @param _end [OpenStruct, Hash] The end instant as UTC milliseconds since Epoch.
3524
3559
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
@@ -3533,11 +3568,11 @@ module FusionAuth
3533
3568
  end
3534
3569
 
3535
3570
  #
3536
- # Retrieves the login report between the two instants for a particular user by login Id. If you specify an application id, it will only return the
3571
+ # Retrieves the login report between the two instants for a particular user by login Id. If you specify an application Id, it will only return the
3537
3572
  # login counts for that application.
3538
3573
  #
3539
- # @param application_id [string] (Optional) The application id.
3540
- # @param login_id [string] The userId id.
3574
+ # @param application_id [string] (Optional) The application Id.
3575
+ # @param login_id [string] The userId Id.
3541
3576
  # @param start [OpenStruct, Hash] The start instant as UTC milliseconds since Epoch.
3542
3577
  # @param _end [OpenStruct, Hash] The end instant as UTC milliseconds since Epoch.
3543
3578
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
@@ -3614,7 +3649,7 @@ module FusionAuth
3614
3649
  end
3615
3650
 
3616
3651
  #
3617
- # Retrieves the webhook for the given Id. If you pass in null for the id, this will return all the webhooks.
3652
+ # Retrieves the webhook for the given Id. If you pass in null for the Id, this will return all the webhooks.
3618
3653
  #
3619
3654
  # @param webhook_id [string] (Optional) The Id of the webhook.
3620
3655
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
@@ -3846,7 +3881,7 @@ module FusionAuth
3846
3881
  end
3847
3882
 
3848
3883
  #
3849
- # Retrieves the entities for the given ids. If any Id is invalid, it is ignored.
3884
+ # Retrieves the entities for the given Ids. If any Id is invalid, it is ignored.
3850
3885
  #
3851
3886
  # @param ids [Array] The entity ids to search for.
3852
3887
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
@@ -4014,7 +4049,7 @@ module FusionAuth
4014
4049
  end
4015
4050
 
4016
4051
  #
4017
- # Retrieves the users for the given ids. If any Id is invalid, it is ignored.
4052
+ # Retrieves the users for the given Ids. If any Id is invalid, it is ignored.
4018
4053
  #
4019
4054
  # @param ids [Array] The user ids to search for.
4020
4055
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
@@ -4027,9 +4062,9 @@ module FusionAuth
4027
4062
  end
4028
4063
 
4029
4064
  #
4030
- # Retrieves the users for the given ids. If any Id is invalid, it is ignored.
4065
+ # Retrieves the users for the given Ids. If any Id is invalid, it is ignored.
4031
4066
  #
4032
- # @param ids [Array] The user ids to search for.
4067
+ # @param ids [Array] The user Ids to search for.
4033
4068
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
4034
4069
  def search_users_by_ids(ids)
4035
4070
  start.uri('/api/user/search')
@@ -4090,7 +4125,7 @@ module FusionAuth
4090
4125
  end
4091
4126
 
4092
4127
  #
4093
- # Send an email using an email template id. You can optionally provide <code>requestData</code> to access key value
4128
+ # Send an email using an email template Id. You can optionally provide <code>requestData</code> to access key value
4094
4129
  # pairs in the email template.
4095
4130
  #
4096
4131
  # @param email_template_id [string] The Id for the template.
@@ -4260,14 +4295,14 @@ module FusionAuth
4260
4295
  end
4261
4296
 
4262
4297
  #
4263
- # Updates an API key by given id
4298
+ # Updates an API key with the given Id.
4264
4299
  #
4265
- # @param api_key_id [string] The Id of the API key to update.
4266
- # @param request [OpenStruct, Hash] The request object that contains all the information used to create the API Key.
4300
+ # @param key_id [string] The Id of the API key to update.
4301
+ # @param request [OpenStruct, Hash] The request that contains all the new API key information.
4267
4302
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
4268
- def update_api_key(api_key_id, request)
4303
+ def update_api_key(key_id, request)
4269
4304
  start.uri('/api/api-key')
4270
- .url_segment(api_key_id)
4305
+ .url_segment(key_id)
4271
4306
  .body_handler(FusionAuth::JSONBodyHandler.new(request))
4272
4307
  .put
4273
4308
  .go
@@ -4716,7 +4751,7 @@ module FusionAuth
4716
4751
  # If you build your own activation form you should validate the user provided code prior to beginning the Authorization grant.
4717
4752
  #
4718
4753
  # @param user_code [string] The end-user verification code.
4719
- # @param client_id [string] The client id.
4754
+ # @param client_id [string] The client Id.
4720
4755
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
4721
4756
  def validate_device(user_code, client_id)
4722
4757
  startAnonymous.uri('/oauth2/device/validate')
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fusionauth_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.57.0
4
+ version: 1.58.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Pontarelli
8
8
  - Daniel DeGroff
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2025-04-07 00:00:00.000000000 Z
11
+ date: 2025-07-23 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: This library contains the Ruby client library that helps you connect
14
14
  your application to FusionAuth.