fusionauth_client 1.57.0 → 1.58.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/build.savant +1 -1
- data/doc/FusionAuth/FusionAuthClient.html +205 -85
- data/doc/created.rid +2 -2
- data/doc/js/navigation.js.gz +0 -0
- data/doc/js/search_index.js +1 -1
- data/doc/js/search_index.js.gz +0 -0
- data/doc/js/searcher.js.gz +0 -0
- data/doc/table_of_contents.html +15 -0
- data/fusionauth_client.gemspec +1 -1
- data/lib/fusionauth/fusionauth_client.rb +65 -48
- metadata +2 -2
data/doc/js/search_index.js.gz
CHANGED
Binary file
|
data/doc/js/searcher.js.gz
CHANGED
Binary file
|
data/doc/table_of_contents.html
CHANGED
@@ -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
|
+
—
|
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
|
+
—
|
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
|
—
|
@@ -1498,6 +1508,11 @@
|
|
1498
1508
|
—
|
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
|
+
—
|
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
|
—
|
data/fusionauth_client.gemspec
CHANGED
@@ -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.
|
22
|
+
spec.version = '1.58.0'
|
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-
|
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,23 @@ 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
|
+
def change_password_by_jwt(encoded_jwt, request)
|
147
|
+
startAnonymous.uri('/api/user/change-password')
|
148
|
+
.authorization('Bearer ' + encoded_jwt)
|
149
|
+
.body_handler(FusionAuth::JSONBodyHandler.new(request))
|
150
|
+
.post
|
151
|
+
.go
|
152
|
+
end
|
153
|
+
|
137
154
|
#
|
138
155
|
# Changes a user's password using their identity (loginId and password). Using a loginId instead of the changePasswordId
|
139
156
|
# bypasses the email verification and allows a password to be changed directly without first calling the #forgotPassword
|
@@ -734,7 +751,7 @@ module FusionAuth
|
|
734
751
|
end
|
735
752
|
|
736
753
|
#
|
737
|
-
# Deactivates the users with the given
|
754
|
+
# Deactivates the users with the given Ids.
|
738
755
|
#
|
739
756
|
# @param user_ids [Array] The ids of the users to deactivate.
|
740
757
|
# @return [FusionAuth::ClientResponse] The ClientResponse object.
|
@@ -749,7 +766,7 @@ module FusionAuth
|
|
749
766
|
end
|
750
767
|
|
751
768
|
#
|
752
|
-
# Deactivates the users with the given
|
769
|
+
# Deactivates the users with the given Ids.
|
753
770
|
#
|
754
771
|
# @param user_ids [Array] The ids of the users to deactivate.
|
755
772
|
# @return [FusionAuth::ClientResponse] The ClientResponse object.
|
@@ -1191,8 +1208,8 @@ module FusionAuth
|
|
1191
1208
|
end
|
1192
1209
|
|
1193
1210
|
#
|
1194
|
-
# Deletes the users with the given
|
1195
|
-
# The order of preference is
|
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.
|
1196
1213
|
#
|
1197
1214
|
# This method can be used to deactivate or permanently delete (hard-delete) users based upon the hardDelete boolean in the request body.
|
1198
1215
|
# Using the dryRun parameter you may also request the result of the action without actually deleting or deactivating any users.
|
@@ -1208,8 +1225,8 @@ module FusionAuth
|
|
1208
1225
|
end
|
1209
1226
|
|
1210
1227
|
#
|
1211
|
-
# Deletes the users with the given
|
1212
|
-
# The order of preference is
|
1228
|
+
# Deletes the users with the given Ids, or users matching the provided JSON query or queryString.
|
1229
|
+
# The order of preference is Ids, query and then queryString, it is recommended to only provide one of the three for the request.
|
1213
1230
|
#
|
1214
1231
|
# This method can be used to deactivate or permanently delete (hard-delete) users based upon the hardDelete boolean in the request body.
|
1215
1232
|
# Using the dryRun parameter you may also request the result of the action without actually deleting or deactivating any users.
|
@@ -1730,7 +1747,7 @@ module FusionAuth
|
|
1730
1747
|
# Modifies a temporal user action by changing the expiration of the action and optionally adding a comment to the
|
1731
1748
|
# action.
|
1732
1749
|
#
|
1733
|
-
# @param action_id [string] The Id of the action to modify. This is technically the user action log
|
1750
|
+
# @param action_id [string] The Id of the action to modify. This is technically the user action log Id.
|
1734
1751
|
# @param request [OpenStruct, Hash] The request that contains all the information about the modification.
|
1735
1752
|
# @return [FusionAuth::ClientResponse] The ClientResponse object.
|
1736
1753
|
def modify_action(action_id, request)
|
@@ -1754,16 +1771,16 @@ module FusionAuth
|
|
1754
1771
|
end
|
1755
1772
|
|
1756
1773
|
#
|
1757
|
-
# Updates an
|
1774
|
+
# Updates an API key with the given Id.
|
1758
1775
|
#
|
1759
|
-
# @param key_id [string] The Id of the
|
1760
|
-
# @param request [OpenStruct, Hash] The request object that contains all the information needed to create the
|
1776
|
+
# @param key_id [string] The Id of the API key. If not provided a secure random api key will be generated.
|
1777
|
+
# @param request [OpenStruct, Hash] The request object that contains all the information needed to create the API key.
|
1761
1778
|
# @return [FusionAuth::ClientResponse] The ClientResponse object.
|
1762
1779
|
def patch_api_key(key_id, request)
|
1763
1780
|
start.uri('/api/api-key')
|
1764
1781
|
.url_segment(key_id)
|
1765
1782
|
.body_handler(FusionAuth::JSONBodyHandler.new(request))
|
1766
|
-
.
|
1783
|
+
.patch
|
1767
1784
|
.go
|
1768
1785
|
end
|
1769
1786
|
|
@@ -2272,7 +2289,7 @@ module FusionAuth
|
|
2272
2289
|
end
|
2273
2290
|
|
2274
2291
|
#
|
2275
|
-
# Removes a user from the family with the given
|
2292
|
+
# Removes a user from the family with the given Id.
|
2276
2293
|
#
|
2277
2294
|
# @param family_id [string] The Id of the family to remove the user from.
|
2278
2295
|
# @param user_id [string] The Id of the user to remove from the family.
|
@@ -2327,7 +2344,7 @@ module FusionAuth
|
|
2327
2344
|
end
|
2328
2345
|
|
2329
2346
|
#
|
2330
|
-
# Retrieves an authentication API key for the given
|
2347
|
+
# Retrieves an authentication API key for the given Id.
|
2331
2348
|
#
|
2332
2349
|
# @param key_id [string] The Id of the API key to retrieve.
|
2333
2350
|
# @return [FusionAuth::ClientResponse] The ClientResponse object.
|
@@ -2393,7 +2410,7 @@ module FusionAuth
|
|
2393
2410
|
#
|
2394
2411
|
# Retrieves the application for the given Id or all the applications if the Id is null.
|
2395
2412
|
#
|
2396
|
-
# @param application_id [string] (Optional) The application
|
2413
|
+
# @param application_id [string] (Optional) The application Id.
|
2397
2414
|
# @return [FusionAuth::ClientResponse] The ClientResponse object.
|
2398
2415
|
def retrieve_application(application_id)
|
2399
2416
|
start.uri('/api/application')
|
@@ -2469,10 +2486,10 @@ module FusionAuth
|
|
2469
2486
|
end
|
2470
2487
|
|
2471
2488
|
#
|
2472
|
-
# Retrieves the daily active user report between the two instants. If you specify an application
|
2489
|
+
# Retrieves the daily active user report between the two instants. If you specify an application Id, it will only
|
2473
2490
|
# return the daily active counts for that application.
|
2474
2491
|
#
|
2475
|
-
# @param application_id [string] (Optional) The application
|
2492
|
+
# @param application_id [string] (Optional) The application Id.
|
2476
2493
|
# @param start [OpenStruct, Hash] The start instant as UTC milliseconds since Epoch.
|
2477
2494
|
# @param _end [OpenStruct, Hash] The end instant as UTC milliseconds since Epoch.
|
2478
2495
|
# @return [FusionAuth::ClientResponse] The ClientResponse object.
|
@@ -2486,7 +2503,7 @@ module FusionAuth
|
|
2486
2503
|
end
|
2487
2504
|
|
2488
2505
|
#
|
2489
|
-
# Retrieves the email template for the given Id. If you don't specify the
|
2506
|
+
# Retrieves the email template for the given Id. If you don't specify the Id, this will return all the email templates.
|
2490
2507
|
#
|
2491
2508
|
# @param email_template_id [string] (Optional) The Id of the email template.
|
2492
2509
|
# @return [FusionAuth::ClientResponse] The ClientResponse object.
|
@@ -2869,10 +2886,10 @@ module FusionAuth
|
|
2869
2886
|
end
|
2870
2887
|
|
2871
2888
|
#
|
2872
|
-
# Retrieves the login report between the two instants. If you specify an application
|
2889
|
+
# Retrieves the login report between the two instants. If you specify an application Id, it will only return the
|
2873
2890
|
# login counts for that application.
|
2874
2891
|
#
|
2875
|
-
# @param application_id [string] (Optional) The application
|
2892
|
+
# @param application_id [string] (Optional) The application Id.
|
2876
2893
|
# @param start [OpenStruct, Hash] The start instant as UTC milliseconds since Epoch.
|
2877
2894
|
# @param _end [OpenStruct, Hash] The end instant as UTC milliseconds since Epoch.
|
2878
2895
|
# @return [FusionAuth::ClientResponse] The ClientResponse object.
|
@@ -2886,7 +2903,7 @@ module FusionAuth
|
|
2886
2903
|
end
|
2887
2904
|
|
2888
2905
|
#
|
2889
|
-
# Retrieves the message template for the given Id. If you don't specify the
|
2906
|
+
# Retrieves the message template for the given Id. If you don't specify the Id, this will return all the message templates.
|
2890
2907
|
#
|
2891
2908
|
# @param message_template_id [string] (Optional) The Id of the message template.
|
2892
2909
|
# @return [FusionAuth::ClientResponse] The ClientResponse object.
|
@@ -2942,10 +2959,10 @@ module FusionAuth
|
|
2942
2959
|
end
|
2943
2960
|
|
2944
2961
|
#
|
2945
|
-
# Retrieves the monthly active user report between the two instants. If you specify an application
|
2962
|
+
# Retrieves the monthly active user report between the two instants. If you specify an application Id, it will only
|
2946
2963
|
# return the monthly active counts for that application.
|
2947
2964
|
#
|
2948
|
-
# @param application_id [string] (Optional) The application
|
2965
|
+
# @param application_id [string] (Optional) The application Id.
|
2949
2966
|
# @param start [OpenStruct, Hash] The start instant as UTC milliseconds since Epoch.
|
2950
2967
|
# @param _end [OpenStruct, Hash] The end instant as UTC milliseconds since Epoch.
|
2951
2968
|
# @return [FusionAuth::ClientResponse] The ClientResponse object.
|
@@ -3108,7 +3125,7 @@ module FusionAuth
|
|
3108
3125
|
end
|
3109
3126
|
|
3110
3127
|
#
|
3111
|
-
# Retrieves the user registration for the user with the given Id and the given application
|
3128
|
+
# Retrieves the user registration for the user with the given Id and the given application Id.
|
3112
3129
|
#
|
3113
3130
|
# @param user_id [string] The Id of the user.
|
3114
3131
|
# @param application_id [string] The Id of the application.
|
@@ -3122,10 +3139,10 @@ module FusionAuth
|
|
3122
3139
|
end
|
3123
3140
|
|
3124
3141
|
#
|
3125
|
-
# Retrieves the registration report between the two instants. If you specify an application
|
3142
|
+
# Retrieves the registration report between the two instants. If you specify an application Id, it will only return
|
3126
3143
|
# the registration counts for that application.
|
3127
3144
|
#
|
3128
|
-
# @param application_id [string] (Optional) The application
|
3145
|
+
# @param application_id [string] (Optional) The application Id.
|
3129
3146
|
# @param start [OpenStruct, Hash] The start instant as UTC milliseconds since Epoch.
|
3130
3147
|
# @param _end [OpenStruct, Hash] The end instant as UTC milliseconds since Epoch.
|
3131
3148
|
# @return [FusionAuth::ClientResponse] The ClientResponse object.
|
@@ -3288,7 +3305,7 @@ module FusionAuth
|
|
3288
3305
|
end
|
3289
3306
|
|
3290
3307
|
#
|
3291
|
-
# Retrieves the user action for the given Id. If you pass in null for the
|
3308
|
+
# Retrieves the user action for the given Id. If you pass in null for the Id, this will return all the user
|
3292
3309
|
# actions.
|
3293
3310
|
#
|
3294
3311
|
# @param user_action_id [string] (Optional) The Id of the user action.
|
@@ -3301,7 +3318,7 @@ module FusionAuth
|
|
3301
3318
|
end
|
3302
3319
|
|
3303
3320
|
#
|
3304
|
-
# Retrieves the user action reason for the given Id. If you pass in null for the
|
3321
|
+
# Retrieves the user action reason for the given Id. If you pass in null for the Id, this will return all the user
|
3305
3322
|
# action reasons.
|
3306
3323
|
#
|
3307
3324
|
# @param user_action_reason_id [string] (Optional) The Id of the user action reason.
|
@@ -3400,8 +3417,8 @@ module FusionAuth
|
|
3400
3417
|
#
|
3401
3418
|
# This API is useful if you want to build your own login workflow to complete a device grant.
|
3402
3419
|
#
|
3403
|
-
# @param client_id [string] The client
|
3404
|
-
# @param client_secret [string] The client
|
3420
|
+
# @param client_id [string] The client Id.
|
3421
|
+
# @param client_secret [string] The client Id.
|
3405
3422
|
# @param user_code [string] The end-user verification code.
|
3406
3423
|
# @return [FusionAuth::ClientResponse] The ClientResponse object.
|
3407
3424
|
def retrieve_user_code(client_id, client_secret, user_code)
|
@@ -3514,11 +3531,11 @@ module FusionAuth
|
|
3514
3531
|
end
|
3515
3532
|
|
3516
3533
|
#
|
3517
|
-
# Retrieves the login report between the two instants for a particular user by Id. If you specify an application
|
3534
|
+
# 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
3535
|
# login counts for that application.
|
3519
3536
|
#
|
3520
|
-
# @param application_id [string] (Optional) The application
|
3521
|
-
# @param user_id [string] The userId
|
3537
|
+
# @param application_id [string] (Optional) The application Id.
|
3538
|
+
# @param user_id [string] The userId Id.
|
3522
3539
|
# @param start [OpenStruct, Hash] The start instant as UTC milliseconds since Epoch.
|
3523
3540
|
# @param _end [OpenStruct, Hash] The end instant as UTC milliseconds since Epoch.
|
3524
3541
|
# @return [FusionAuth::ClientResponse] The ClientResponse object.
|
@@ -3533,11 +3550,11 @@ module FusionAuth
|
|
3533
3550
|
end
|
3534
3551
|
|
3535
3552
|
#
|
3536
|
-
# Retrieves the login report between the two instants for a particular user by login Id. If you specify an application
|
3553
|
+
# 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
3554
|
# login counts for that application.
|
3538
3555
|
#
|
3539
|
-
# @param application_id [string] (Optional) The application
|
3540
|
-
# @param login_id [string] The userId
|
3556
|
+
# @param application_id [string] (Optional) The application Id.
|
3557
|
+
# @param login_id [string] The userId Id.
|
3541
3558
|
# @param start [OpenStruct, Hash] The start instant as UTC milliseconds since Epoch.
|
3542
3559
|
# @param _end [OpenStruct, Hash] The end instant as UTC milliseconds since Epoch.
|
3543
3560
|
# @return [FusionAuth::ClientResponse] The ClientResponse object.
|
@@ -3614,7 +3631,7 @@ module FusionAuth
|
|
3614
3631
|
end
|
3615
3632
|
|
3616
3633
|
#
|
3617
|
-
# Retrieves the webhook for the given Id. If you pass in null for the
|
3634
|
+
# Retrieves the webhook for the given Id. If you pass in null for the Id, this will return all the webhooks.
|
3618
3635
|
#
|
3619
3636
|
# @param webhook_id [string] (Optional) The Id of the webhook.
|
3620
3637
|
# @return [FusionAuth::ClientResponse] The ClientResponse object.
|
@@ -3846,7 +3863,7 @@ module FusionAuth
|
|
3846
3863
|
end
|
3847
3864
|
|
3848
3865
|
#
|
3849
|
-
# Retrieves the entities for the given
|
3866
|
+
# Retrieves the entities for the given Ids. If any Id is invalid, it is ignored.
|
3850
3867
|
#
|
3851
3868
|
# @param ids [Array] The entity ids to search for.
|
3852
3869
|
# @return [FusionAuth::ClientResponse] The ClientResponse object.
|
@@ -4014,7 +4031,7 @@ module FusionAuth
|
|
4014
4031
|
end
|
4015
4032
|
|
4016
4033
|
#
|
4017
|
-
# Retrieves the users for the given
|
4034
|
+
# Retrieves the users for the given Ids. If any Id is invalid, it is ignored.
|
4018
4035
|
#
|
4019
4036
|
# @param ids [Array] The user ids to search for.
|
4020
4037
|
# @return [FusionAuth::ClientResponse] The ClientResponse object.
|
@@ -4027,9 +4044,9 @@ module FusionAuth
|
|
4027
4044
|
end
|
4028
4045
|
|
4029
4046
|
#
|
4030
|
-
# Retrieves the users for the given
|
4047
|
+
# Retrieves the users for the given Ids. If any Id is invalid, it is ignored.
|
4031
4048
|
#
|
4032
|
-
# @param ids [Array] The user
|
4049
|
+
# @param ids [Array] The user Ids to search for.
|
4033
4050
|
# @return [FusionAuth::ClientResponse] The ClientResponse object.
|
4034
4051
|
def search_users_by_ids(ids)
|
4035
4052
|
start.uri('/api/user/search')
|
@@ -4090,7 +4107,7 @@ module FusionAuth
|
|
4090
4107
|
end
|
4091
4108
|
|
4092
4109
|
#
|
4093
|
-
# Send an email using an email template
|
4110
|
+
# Send an email using an email template Id. You can optionally provide <code>requestData</code> to access key value
|
4094
4111
|
# pairs in the email template.
|
4095
4112
|
#
|
4096
4113
|
# @param email_template_id [string] The Id for the template.
|
@@ -4260,14 +4277,14 @@ module FusionAuth
|
|
4260
4277
|
end
|
4261
4278
|
|
4262
4279
|
#
|
4263
|
-
# Updates an API key
|
4280
|
+
# Updates an API key with the given Id.
|
4264
4281
|
#
|
4265
|
-
# @param
|
4266
|
-
# @param request [OpenStruct, Hash] The request
|
4282
|
+
# @param key_id [string] The Id of the API key to update.
|
4283
|
+
# @param request [OpenStruct, Hash] The request that contains all the new API key information.
|
4267
4284
|
# @return [FusionAuth::ClientResponse] The ClientResponse object.
|
4268
|
-
def update_api_key(
|
4285
|
+
def update_api_key(key_id, request)
|
4269
4286
|
start.uri('/api/api-key')
|
4270
|
-
.url_segment(
|
4287
|
+
.url_segment(key_id)
|
4271
4288
|
.body_handler(FusionAuth::JSONBodyHandler.new(request))
|
4272
4289
|
.put
|
4273
4290
|
.go
|
@@ -4716,7 +4733,7 @@ module FusionAuth
|
|
4716
4733
|
# If you build your own activation form you should validate the user provided code prior to beginning the Authorization grant.
|
4717
4734
|
#
|
4718
4735
|
# @param user_code [string] The end-user verification code.
|
4719
|
-
# @param client_id [string] The client
|
4736
|
+
# @param client_id [string] The client Id.
|
4720
4737
|
# @return [FusionAuth::ClientResponse] The ClientResponse object.
|
4721
4738
|
def validate_device(user_code, client_id)
|
4722
4739
|
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.
|
4
|
+
version: 1.58.0
|
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-
|
11
|
+
date: 2025-07-21 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.
|