fusionauth_client 1.24.0 → 1.27.2
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/.gitignore +0 -1
- data/Gemfile.lock +27 -0
- data/build.savant +1 -1
- data/fusionauth-ruby-client.iml +28 -0
- data/fusionauth_client.gemspec +1 -1
- data/lib/fusionauth/fusionauth_client.rb +711 -3
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c3be99d4a422cd75a0161a5fa7a93bcde4c83c28abb43284d43b22e490fadfb7
|
4
|
+
data.tar.gz: fc5c5fcb80f985800cb8bd81308b4adeff01082bcfacf53603fecb61206e952a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ceb82d839e3bc5e1f1769d59d033fbc92834c6af96331f514eb2b0a8f583b49586167a61530a2fc23abcf000405bb59b87e10db0a83b636ee4bcfd6aab6ded79
|
7
|
+
data.tar.gz: 20fdd61ccc7b0e029a628b105801fa2546b58f0ac8abf0b260dd916ad2ba805846934a74abe783ee2a018253210f6fda315f870084c3b31def6e18967d5c69a2
|
data/.gitignore
CHANGED
data/Gemfile.lock
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
fusionauth_client (1.27.2)
|
5
|
+
|
6
|
+
GEM
|
7
|
+
remote: https://rubygems.org/
|
8
|
+
specs:
|
9
|
+
minitest (5.8.3)
|
10
|
+
rake (12.3.3)
|
11
|
+
|
12
|
+
PLATFORMS
|
13
|
+
ruby
|
14
|
+
x86_64-darwin-19
|
15
|
+
x86_64-darwin-20
|
16
|
+
x86_64-linux
|
17
|
+
|
18
|
+
DEPENDENCIES
|
19
|
+
fusionauth_client!
|
20
|
+
minitest (= 5.8.3)
|
21
|
+
rake (= 12.3.3)
|
22
|
+
|
23
|
+
RUBY VERSION
|
24
|
+
ruby 2.5.1p57
|
25
|
+
|
26
|
+
BUNDLED WITH
|
27
|
+
2.2.5
|
data/build.savant
CHANGED
@@ -16,7 +16,7 @@
|
|
16
16
|
savantVersion = "1.0.0"
|
17
17
|
|
18
18
|
pubVersion = ""
|
19
|
-
project(group: "io.fusionauth", name: "fusionauth-ruby-client", version: "1.
|
19
|
+
project(group: "io.fusionauth", name: "fusionauth-ruby-client", version: "1.27.2", licenses: ["ApacheV2_0"]) {
|
20
20
|
workflow {
|
21
21
|
standard()
|
22
22
|
}
|
data/fusionauth-ruby-client.iml
CHANGED
@@ -12,4 +12,32 @@
|
|
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>
|
data/fusionauth_client.gemspec
CHANGED
@@ -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.
|
7
|
+
spec.version = '1.27.2'
|
8
8
|
spec.authors = ['Brian Pontarelli', 'Daniel DeGroff']
|
9
9
|
spec.email = %w(brian@fusionauth.io daniel@fusionauth.io)
|
10
10
|
|
@@ -55,6 +55,18 @@ module FusionAuth
|
|
55
55
|
.go()
|
56
56
|
end
|
57
57
|
|
58
|
+
#
|
59
|
+
# Activates the FusionAuth Reactor using a license id and optionally a license text (for air-gapped deployments)
|
60
|
+
#
|
61
|
+
# @param request [OpenStruct, Hash] An optional request that contains the license text to activate Reactor (useful for air-gap deployments of FusionAuth).
|
62
|
+
# @return [FusionAuth::ClientResponse] The ClientResponse object.
|
63
|
+
def activate_reactor(request)
|
64
|
+
start.uri('/api/reactor')
|
65
|
+
.body_handler(FusionAuth::JSONBodyHandler.new(request))
|
66
|
+
.post()
|
67
|
+
.go()
|
68
|
+
end
|
69
|
+
|
58
70
|
#
|
59
71
|
# Adds a user to an existing family. The family id must be specified.
|
60
72
|
#
|
@@ -91,7 +103,7 @@ module FusionAuth
|
|
91
103
|
# @param request [OpenStruct, Hash] The change password request that contains all of the information used to change the password.
|
92
104
|
# @return [FusionAuth::ClientResponse] The ClientResponse object.
|
93
105
|
def change_password(change_password_id, request)
|
94
|
-
|
106
|
+
startAnonymous.uri('/api/user/change-password')
|
95
107
|
.url_segment(change_password_id)
|
96
108
|
.body_handler(FusionAuth::JSONBodyHandler.new(request))
|
97
109
|
.post()
|
@@ -124,6 +136,24 @@ module FusionAuth
|
|
124
136
|
.go()
|
125
137
|
end
|
126
138
|
|
139
|
+
#
|
140
|
+
# Creates an API key. You can optionally specify a unique Id for the key, if not provided one will be generated.
|
141
|
+
# an API key can only be created with equal or lesser authority. An API key cannot create another API key unless it is granted
|
142
|
+
# to that API key.
|
143
|
+
#
|
144
|
+
# If an API key is locked to a tenant, it can only create API Keys for that same tenant.
|
145
|
+
#
|
146
|
+
# @param key_id [string] (Optional) The unique Id of the API key. If not provided a secure random Id will be generated.
|
147
|
+
# @param request [OpenStruct, Hash] The request object that contains all of the information needed to create the APIKey.
|
148
|
+
# @return [FusionAuth::ClientResponse] The ClientResponse object.
|
149
|
+
def create_api_key(key_id, request)
|
150
|
+
start.uri('/api/api-key')
|
151
|
+
.url_segment(key_id)
|
152
|
+
.body_handler(FusionAuth::JSONBodyHandler.new(request))
|
153
|
+
.post()
|
154
|
+
.go()
|
155
|
+
end
|
156
|
+
|
127
157
|
#
|
128
158
|
# Creates an application. You can optionally specify an Id for the application, if not provided one will be generated.
|
129
159
|
#
|
@@ -212,6 +242,52 @@ module FusionAuth
|
|
212
242
|
.go()
|
213
243
|
end
|
214
244
|
|
245
|
+
#
|
246
|
+
# Creates an Entity. You can optionally specify an Id for the Entity. If not provided one will be generated.
|
247
|
+
#
|
248
|
+
# @param entity_id [string] (Optional) The Id for the Entity. If not provided a secure random UUID will be generated.
|
249
|
+
# @param request [OpenStruct, Hash] The request object that contains all of the information used to create the Entity.
|
250
|
+
# @return [FusionAuth::ClientResponse] The ClientResponse object.
|
251
|
+
def create_entity(entity_id, request)
|
252
|
+
start.uri('/api/entity')
|
253
|
+
.url_segment(entity_id)
|
254
|
+
.body_handler(FusionAuth::JSONBodyHandler.new(request))
|
255
|
+
.post()
|
256
|
+
.go()
|
257
|
+
end
|
258
|
+
|
259
|
+
#
|
260
|
+
# Creates a Entity Type. You can optionally specify an Id for the Entity Type, if not provided one will be generated.
|
261
|
+
#
|
262
|
+
# @param entity_type_id [string] (Optional) The Id for the Entity Type. If not provided a secure random UUID will be generated.
|
263
|
+
# @param request [OpenStruct, Hash] The request object that contains all of the information used to create the Entity Type.
|
264
|
+
# @return [FusionAuth::ClientResponse] The ClientResponse object.
|
265
|
+
def create_entity_type(entity_type_id, request)
|
266
|
+
start.uri('/api/entity/type')
|
267
|
+
.url_segment(entity_type_id)
|
268
|
+
.body_handler(FusionAuth::JSONBodyHandler.new(request))
|
269
|
+
.post()
|
270
|
+
.go()
|
271
|
+
end
|
272
|
+
|
273
|
+
#
|
274
|
+
# Creates a new permission for an entity type. You must specify the id of the entity type you are creating the permission for.
|
275
|
+
# You can optionally specify an Id for the permission inside the EntityTypePermission object itself, if not provided one will be generated.
|
276
|
+
#
|
277
|
+
# @param entity_type_id [string] The Id of the entity type to create the permission on.
|
278
|
+
# @param permission_id [string] (Optional) The Id of the permission. If not provided a secure random UUID will be generated.
|
279
|
+
# @param request [OpenStruct, Hash] The request object that contains all of the information used to create the permission.
|
280
|
+
# @return [FusionAuth::ClientResponse] The ClientResponse object.
|
281
|
+
def create_entity_type_permission(entity_type_id, permission_id, request)
|
282
|
+
start.uri('/api/entity/type')
|
283
|
+
.url_segment(entity_type_id)
|
284
|
+
.url_segment("permission")
|
285
|
+
.url_segment(permission_id)
|
286
|
+
.body_handler(FusionAuth::JSONBodyHandler.new(request))
|
287
|
+
.post()
|
288
|
+
.go()
|
289
|
+
end
|
290
|
+
|
215
291
|
#
|
216
292
|
# Creates a family with the user id in the request as the owner and sole member of the family. You can optionally specify an id for the
|
217
293
|
# family, if not provided one will be generated.
|
@@ -309,6 +385,34 @@ module FusionAuth
|
|
309
385
|
.go()
|
310
386
|
end
|
311
387
|
|
388
|
+
#
|
389
|
+
# Creates an message template. You can optionally specify an Id for the template, if not provided one will be generated.
|
390
|
+
#
|
391
|
+
# @param message_template_id [string] (Optional) The Id for the template. If not provided a secure random UUID will be generated.
|
392
|
+
# @param request [OpenStruct, Hash] The request object that contains all of the information used to create the message template.
|
393
|
+
# @return [FusionAuth::ClientResponse] The ClientResponse object.
|
394
|
+
def create_message_template(message_template_id, request)
|
395
|
+
start.uri('/api/message/template')
|
396
|
+
.url_segment(message_template_id)
|
397
|
+
.body_handler(FusionAuth::JSONBodyHandler.new(request))
|
398
|
+
.post()
|
399
|
+
.go()
|
400
|
+
end
|
401
|
+
|
402
|
+
#
|
403
|
+
# Creates a messenger. You can optionally specify an Id for the messenger, if not provided one will be generated.
|
404
|
+
#
|
405
|
+
# @param messenger_id [string] (Optional) The Id for the messenger. If not provided a secure random UUID will be generated.
|
406
|
+
# @param request [OpenStruct, Hash] The request object that contains all of the information used to create the messenger.
|
407
|
+
# @return [FusionAuth::ClientResponse] The ClientResponse object.
|
408
|
+
def create_messenger(messenger_id, request)
|
409
|
+
start.uri('/api/messenger')
|
410
|
+
.url_segment(messenger_id)
|
411
|
+
.body_handler(FusionAuth::JSONBodyHandler.new(request))
|
412
|
+
.post()
|
413
|
+
.go()
|
414
|
+
end
|
415
|
+
|
312
416
|
#
|
313
417
|
# Creates a tenant. You can optionally specify an Id for the tenant, if not provided one will be generated.
|
314
418
|
#
|
@@ -421,6 +525,16 @@ module FusionAuth
|
|
421
525
|
.go()
|
422
526
|
end
|
423
527
|
|
528
|
+
#
|
529
|
+
# Deactivates the FusionAuth Reactor.
|
530
|
+
#
|
531
|
+
# @return [FusionAuth::ClientResponse] The ClientResponse object.
|
532
|
+
def deactivate_reactor()
|
533
|
+
start.uri('/api/reactor')
|
534
|
+
.delete()
|
535
|
+
.go()
|
536
|
+
end
|
537
|
+
|
424
538
|
#
|
425
539
|
# Deactivates the user with the given Id.
|
426
540
|
#
|
@@ -474,6 +588,18 @@ module FusionAuth
|
|
474
588
|
.go()
|
475
589
|
end
|
476
590
|
|
591
|
+
#
|
592
|
+
# Deletes the API key for the given Id.
|
593
|
+
#
|
594
|
+
# @param key_id [string] The Id of the authentication API key to delete.
|
595
|
+
# @return [FusionAuth::ClientResponse] The ClientResponse object.
|
596
|
+
def delete_api_key(key_id)
|
597
|
+
start.uri('/api/api-key')
|
598
|
+
.url_segment(key_id)
|
599
|
+
.delete()
|
600
|
+
.go()
|
601
|
+
end
|
602
|
+
|
477
603
|
#
|
478
604
|
# Hard deletes an application. This is a dangerous operation and should not be used in most circumstances. This will
|
479
605
|
# delete the application, any registrations for that application, metrics and reports for the application, all the
|
@@ -542,6 +668,63 @@ module FusionAuth
|
|
542
668
|
.go()
|
543
669
|
end
|
544
670
|
|
671
|
+
#
|
672
|
+
# Deletes the Entity for the given Id.
|
673
|
+
#
|
674
|
+
# @param entity_id [string] The Id of the Entity to delete.
|
675
|
+
# @return [FusionAuth::ClientResponse] The ClientResponse object.
|
676
|
+
def delete_entity(entity_id)
|
677
|
+
start.uri('/api/entity')
|
678
|
+
.url_segment(entity_id)
|
679
|
+
.delete()
|
680
|
+
.go()
|
681
|
+
end
|
682
|
+
|
683
|
+
#
|
684
|
+
# Deletes an Entity Grant for the given User or Entity.
|
685
|
+
#
|
686
|
+
# @param entity_id [string] The Id of the Entity that the Entity Grant is being deleted for.
|
687
|
+
# @param recipient_entity_id [string] (Optional) The Id of the Entity that the Entity Grant is for.
|
688
|
+
# @param user_id [string] (Optional) The Id of the User that the Entity Grant is for.
|
689
|
+
# @return [FusionAuth::ClientResponse] The ClientResponse object.
|
690
|
+
def delete_entity_grant(entity_id, recipient_entity_id, user_id)
|
691
|
+
start.uri('/api/entity')
|
692
|
+
.url_segment(entity_id)
|
693
|
+
.url_segment("grant")
|
694
|
+
.url_parameter('recipientEntityId', recipient_entity_id)
|
695
|
+
.url_parameter('userId', user_id)
|
696
|
+
.delete()
|
697
|
+
.go()
|
698
|
+
end
|
699
|
+
|
700
|
+
#
|
701
|
+
# Deletes the Entity Type for the given Id.
|
702
|
+
#
|
703
|
+
# @param entity_type_id [string] The Id of the Entity Type to delete.
|
704
|
+
# @return [FusionAuth::ClientResponse] The ClientResponse object.
|
705
|
+
def delete_entity_type(entity_type_id)
|
706
|
+
start.uri('/api/entity/type')
|
707
|
+
.url_segment(entity_type_id)
|
708
|
+
.delete()
|
709
|
+
.go()
|
710
|
+
end
|
711
|
+
|
712
|
+
#
|
713
|
+
# Hard deletes a permission. This is a dangerous operation and should not be used in most circumstances. This
|
714
|
+
# permanently removes the given permission from all grants that had it.
|
715
|
+
#
|
716
|
+
# @param entity_type_id [string] The Id of the entityType the the permission belongs to.
|
717
|
+
# @param permission_id [string] The Id of the permission to delete.
|
718
|
+
# @return [FusionAuth::ClientResponse] The ClientResponse object.
|
719
|
+
def delete_entity_type_permission(entity_type_id, permission_id)
|
720
|
+
start.uri('/api/entity/type')
|
721
|
+
.url_segment(entity_type_id)
|
722
|
+
.url_segment("permission")
|
723
|
+
.url_segment(permission_id)
|
724
|
+
.delete()
|
725
|
+
.go()
|
726
|
+
end
|
727
|
+
|
545
728
|
#
|
546
729
|
# Deletes the form for the given Id.
|
547
730
|
#
|
@@ -626,6 +809,30 @@ module FusionAuth
|
|
626
809
|
.go()
|
627
810
|
end
|
628
811
|
|
812
|
+
#
|
813
|
+
# Deletes the message template for the given Id.
|
814
|
+
#
|
815
|
+
# @param message_template_id [string] The Id of the message template to delete.
|
816
|
+
# @return [FusionAuth::ClientResponse] The ClientResponse object.
|
817
|
+
def delete_message_template(message_template_id)
|
818
|
+
start.uri('/api/message/template')
|
819
|
+
.url_segment(message_template_id)
|
820
|
+
.delete()
|
821
|
+
.go()
|
822
|
+
end
|
823
|
+
|
824
|
+
#
|
825
|
+
# Deletes the messenger for the given Id.
|
826
|
+
#
|
827
|
+
# @param messenger_id [string] The Id of the messenger to delete.
|
828
|
+
# @return [FusionAuth::ClientResponse] The ClientResponse object.
|
829
|
+
def delete_messenger(messenger_id)
|
830
|
+
start.uri('/api/messenger')
|
831
|
+
.url_segment(messenger_id)
|
832
|
+
.delete()
|
833
|
+
.go()
|
834
|
+
end
|
835
|
+
|
629
836
|
#
|
630
837
|
# Deletes the user registration for the given user and application.
|
631
838
|
#
|
@@ -767,11 +974,13 @@ module FusionAuth
|
|
767
974
|
# Disable Two Factor authentication for a user.
|
768
975
|
#
|
769
976
|
# @param user_id [string] The Id of the User for which you're disabling Two Factor authentication.
|
977
|
+
# @param method_id [string] The two-factor method identifier you wish to disable
|
770
978
|
# @param code [string] The Two Factor code used verify the the caller knows the Two Factor secret.
|
771
979
|
# @return [FusionAuth::ClientResponse] The ClientResponse object.
|
772
|
-
def disable_two_factor(user_id, code)
|
980
|
+
def disable_two_factor(user_id, method_id, code)
|
773
981
|
start.uri('/api/user/two-factor')
|
774
982
|
.url_parameter('userId', user_id)
|
983
|
+
.url_parameter('methodId', method_id)
|
775
984
|
.url_parameter('code', code)
|
776
985
|
.delete()
|
777
986
|
.go()
|
@@ -959,6 +1168,18 @@ module FusionAuth
|
|
959
1168
|
.go()
|
960
1169
|
end
|
961
1170
|
|
1171
|
+
#
|
1172
|
+
# Generate two-factor recovery codes for a user. Generating two-factor recovery codes will invalidate any existing recovery codes.
|
1173
|
+
#
|
1174
|
+
# @param user_id [string] The Id of the user to generate new Two Factor recovery codes.
|
1175
|
+
# @return [FusionAuth::ClientResponse] The ClientResponse object.
|
1176
|
+
def generate_two_factor_recovery_codes(user_id)
|
1177
|
+
start.uri('/api/user/two-factor/recovery-code')
|
1178
|
+
.url_segment(user_id)
|
1179
|
+
.post()
|
1180
|
+
.go()
|
1181
|
+
end
|
1182
|
+
|
962
1183
|
#
|
963
1184
|
# Generate a Two Factor secret that can be used to enable Two Factor authentication for a User. The response will contain
|
964
1185
|
# 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 +1403,20 @@ module FusionAuth
|
|
1182
1403
|
.go()
|
1183
1404
|
end
|
1184
1405
|
|
1406
|
+
#
|
1407
|
+
# Updates an authentication API key by given id
|
1408
|
+
#
|
1409
|
+
# @param key_id [string] The Id of the authentication key. If not provided a secure random api key will be generated.
|
1410
|
+
# @param request [OpenStruct, Hash] The request object that contains all of the information needed to create the APIKey.
|
1411
|
+
# @return [FusionAuth::ClientResponse] The ClientResponse object.
|
1412
|
+
def patch_api_key(key_id, request)
|
1413
|
+
start.uri('/api/api-key')
|
1414
|
+
.url_segment(key_id)
|
1415
|
+
.body_handler(FusionAuth::JSONBodyHandler.new(request))
|
1416
|
+
.post()
|
1417
|
+
.go()
|
1418
|
+
end
|
1419
|
+
|
1185
1420
|
#
|
1186
1421
|
# Updates, via PATCH, the application with the given Id.
|
1187
1422
|
#
|
@@ -1255,6 +1490,20 @@ module FusionAuth
|
|
1255
1490
|
.go()
|
1256
1491
|
end
|
1257
1492
|
|
1493
|
+
#
|
1494
|
+
# Updates, via PATCH, the Entity Type with the given Id.
|
1495
|
+
#
|
1496
|
+
# @param entity_type_id [string] The Id of the Entity Type to update.
|
1497
|
+
# @param request [OpenStruct, Hash] The request that contains just the new Entity Type information.
|
1498
|
+
# @return [FusionAuth::ClientResponse] The ClientResponse object.
|
1499
|
+
def patch_entity_type(entity_type_id, request)
|
1500
|
+
start.uri('/api/entity/type')
|
1501
|
+
.url_segment(entity_type_id)
|
1502
|
+
.body_handler(FusionAuth::JSONBodyHandler.new(request))
|
1503
|
+
.patch()
|
1504
|
+
.go()
|
1505
|
+
end
|
1506
|
+
|
1258
1507
|
#
|
1259
1508
|
# Updates, via PATCH, the group with the given Id.
|
1260
1509
|
#
|
@@ -1309,6 +1558,34 @@ module FusionAuth
|
|
1309
1558
|
.go()
|
1310
1559
|
end
|
1311
1560
|
|
1561
|
+
#
|
1562
|
+
# Updates, via PATCH, the message template with the given Id.
|
1563
|
+
#
|
1564
|
+
# @param message_template_id [string] The Id of the message template to update.
|
1565
|
+
# @param request [OpenStruct, Hash] The request that contains just the new message template information.
|
1566
|
+
# @return [FusionAuth::ClientResponse] The ClientResponse object.
|
1567
|
+
def patch_message_template(message_template_id, request)
|
1568
|
+
start.uri('/api/message/template')
|
1569
|
+
.url_segment(message_template_id)
|
1570
|
+
.body_handler(FusionAuth::JSONBodyHandler.new(request))
|
1571
|
+
.patch()
|
1572
|
+
.go()
|
1573
|
+
end
|
1574
|
+
|
1575
|
+
#
|
1576
|
+
# Updates, via PATCH, the messenger with the given Id.
|
1577
|
+
#
|
1578
|
+
# @param messenger_id [string] The Id of the messenger to update.
|
1579
|
+
# @param request [OpenStruct, Hash] The request that contains just the new messenger information.
|
1580
|
+
# @return [FusionAuth::ClientResponse] The ClientResponse object.
|
1581
|
+
def patch_messenger(messenger_id, request)
|
1582
|
+
start.uri('/api/messenger')
|
1583
|
+
.url_segment(messenger_id)
|
1584
|
+
.body_handler(FusionAuth::JSONBodyHandler.new(request))
|
1585
|
+
.patch()
|
1586
|
+
.go()
|
1587
|
+
end
|
1588
|
+
|
1312
1589
|
#
|
1313
1590
|
# Updates, via PATCH, the registration for the user with the given id and the application defined in the request.
|
1314
1591
|
#
|
@@ -1470,6 +1747,19 @@ module FusionAuth
|
|
1470
1747
|
.go()
|
1471
1748
|
end
|
1472
1749
|
|
1750
|
+
#
|
1751
|
+
# Request a refresh of the Entity search index. This API is not generally necessary and the search index will become consistent in a
|
1752
|
+
# reasonable amount of time. There may be scenarios where you may wish to manually request an index refresh. One example may be
|
1753
|
+
# 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
|
1754
|
+
# ensure the index immediately current before making a query request to the search index.
|
1755
|
+
#
|
1756
|
+
# @return [FusionAuth::ClientResponse] The ClientResponse object.
|
1757
|
+
def refresh_entity_search_index()
|
1758
|
+
start.uri('/api/entity/search')
|
1759
|
+
.put()
|
1760
|
+
.go()
|
1761
|
+
end
|
1762
|
+
|
1473
1763
|
#
|
1474
1764
|
# Request a refresh of the User search index. This API is not generally necessary and the search index will become consistent in a
|
1475
1765
|
# reasonable amount of time. There may be scenarios where you may wish to manually request an index refresh. One example may be
|
@@ -1483,6 +1773,16 @@ module FusionAuth
|
|
1483
1773
|
.go()
|
1484
1774
|
end
|
1485
1775
|
|
1776
|
+
#
|
1777
|
+
# Regenerates any keys that are used by the FusionAuth Reactor.
|
1778
|
+
#
|
1779
|
+
# @return [FusionAuth::ClientResponse] The ClientResponse object.
|
1780
|
+
def regenerate_reactor_keys()
|
1781
|
+
start.uri('/api/reactor')
|
1782
|
+
.put()
|
1783
|
+
.go()
|
1784
|
+
end
|
1785
|
+
|
1486
1786
|
#
|
1487
1787
|
# Registers a user for an application. If you provide the User and the UserRegistration object on this request, it
|
1488
1788
|
# will create the user as well as register them for the application. This is called a Full Registration. However, if
|
@@ -1556,6 +1856,18 @@ module FusionAuth
|
|
1556
1856
|
.go()
|
1557
1857
|
end
|
1558
1858
|
|
1859
|
+
#
|
1860
|
+
# Retrieves an authentication API key for the given id
|
1861
|
+
#
|
1862
|
+
# @param key_id [string] The Id of the API key to retrieve.
|
1863
|
+
# @return [FusionAuth::ClientResponse] The ClientResponse object.
|
1864
|
+
def retrieve_api_key(key_id)
|
1865
|
+
start.uri('/api/api-key')
|
1866
|
+
.url_segment(key_id)
|
1867
|
+
.get()
|
1868
|
+
.go()
|
1869
|
+
end
|
1870
|
+
|
1559
1871
|
#
|
1560
1872
|
# Retrieves a single action log (the log of a user action that was taken on a user previously) for the given Id.
|
1561
1873
|
#
|
@@ -1739,6 +2051,57 @@ module FusionAuth
|
|
1739
2051
|
.go()
|
1740
2052
|
end
|
1741
2053
|
|
2054
|
+
#
|
2055
|
+
# Retrieves the Entity for the given Id.
|
2056
|
+
#
|
2057
|
+
# @param entity_id [string] The Id of the Entity.
|
2058
|
+
# @return [FusionAuth::ClientResponse] The ClientResponse object.
|
2059
|
+
def retrieve_entity(entity_id)
|
2060
|
+
start.uri('/api/entity')
|
2061
|
+
.url_segment(entity_id)
|
2062
|
+
.get()
|
2063
|
+
.go()
|
2064
|
+
end
|
2065
|
+
|
2066
|
+
#
|
2067
|
+
# Retrieves an Entity Grant for the given Entity and User/Entity.
|
2068
|
+
#
|
2069
|
+
# @param entity_id [string] The Id of the Entity.
|
2070
|
+
# @param recipient_entity_id [string] (Optional) The Id of the Entity that the Entity Grant is for.
|
2071
|
+
# @param user_id [string] (Optional) The Id of the User that the Entity Grant is for.
|
2072
|
+
# @return [FusionAuth::ClientResponse] The ClientResponse object.
|
2073
|
+
def retrieve_entity_grant(entity_id, recipient_entity_id, user_id)
|
2074
|
+
start.uri('/api/entity')
|
2075
|
+
.url_segment(entity_id)
|
2076
|
+
.url_segment("grant")
|
2077
|
+
.url_parameter('recipientEntityId', recipient_entity_id)
|
2078
|
+
.url_parameter('userId', user_id)
|
2079
|
+
.get()
|
2080
|
+
.go()
|
2081
|
+
end
|
2082
|
+
|
2083
|
+
#
|
2084
|
+
# Retrieves the Entity Type for the given Id.
|
2085
|
+
#
|
2086
|
+
# @param entity_type_id [string] The Id of the Entity Type.
|
2087
|
+
# @return [FusionAuth::ClientResponse] The ClientResponse object.
|
2088
|
+
def retrieve_entity_type(entity_type_id)
|
2089
|
+
start.uri('/api/entity/type')
|
2090
|
+
.url_segment(entity_type_id)
|
2091
|
+
.get()
|
2092
|
+
.go()
|
2093
|
+
end
|
2094
|
+
|
2095
|
+
#
|
2096
|
+
# Retrieves all of the Entity Types.
|
2097
|
+
#
|
2098
|
+
# @return [FusionAuth::ClientResponse] The ClientResponse object.
|
2099
|
+
def retrieve_entity_types()
|
2100
|
+
start.uri('/api/entity/type')
|
2101
|
+
.get()
|
2102
|
+
.go()
|
2103
|
+
end
|
2104
|
+
|
1742
2105
|
#
|
1743
2106
|
# Retrieves a single event log for the given Id.
|
1744
2107
|
#
|
@@ -1844,7 +2207,7 @@ module FusionAuth
|
|
1844
2207
|
#
|
1845
2208
|
# Retrieves the identity provider for the given id or all of the identity providers if the id is null.
|
1846
2209
|
#
|
1847
|
-
# @param identity_provider_id [string]
|
2210
|
+
# @param identity_provider_id [string] The identity provider Id.
|
1848
2211
|
# @return [FusionAuth::ClientResponse] The ClientResponse object.
|
1849
2212
|
def retrieve_identity_provider(identity_provider_id)
|
1850
2213
|
start.uri('/api/identity-provider')
|
@@ -1853,6 +2216,20 @@ module FusionAuth
|
|
1853
2216
|
.go()
|
1854
2217
|
end
|
1855
2218
|
|
2219
|
+
#
|
2220
|
+
# Retrieves one or more identity provider for the given type. For types such as Google, Facebook, Twitter and LinkedIn, only a single
|
2221
|
+
# identity provider can exist. For types such as OpenID Connect and SAMLv2 more than one identity provider can be configured so this request
|
2222
|
+
# may return multiple identity providers.
|
2223
|
+
#
|
2224
|
+
# @param type [OpenStruct, Hash] The type of the identity provider.
|
2225
|
+
# @return [FusionAuth::ClientResponse] The ClientResponse object.
|
2226
|
+
def retrieve_identity_provider_by_type(type)
|
2227
|
+
start.uri('/api/identity-provider')
|
2228
|
+
.url_parameter('type', type)
|
2229
|
+
.get()
|
2230
|
+
.go()
|
2231
|
+
end
|
2232
|
+
|
1856
2233
|
#
|
1857
2234
|
# Retrieves all of the identity providers.
|
1858
2235
|
#
|
@@ -2026,6 +2403,62 @@ module FusionAuth
|
|
2026
2403
|
.go()
|
2027
2404
|
end
|
2028
2405
|
|
2406
|
+
#
|
2407
|
+
# Retrieves the message template for the given Id. If you don't specify the id, this will return all of the message templates.
|
2408
|
+
#
|
2409
|
+
# @param message_template_id [string] (Optional) The Id of the message template.
|
2410
|
+
# @return [FusionAuth::ClientResponse] The ClientResponse object.
|
2411
|
+
def retrieve_message_template(message_template_id)
|
2412
|
+
start.uri('/api/message/template')
|
2413
|
+
.url_segment(message_template_id)
|
2414
|
+
.get()
|
2415
|
+
.go()
|
2416
|
+
end
|
2417
|
+
|
2418
|
+
#
|
2419
|
+
# Creates a preview of the message template provided in the request, normalized to a given locale.
|
2420
|
+
#
|
2421
|
+
# @param request [OpenStruct, Hash] The request that contains the email template and optionally a locale to render it in.
|
2422
|
+
# @return [FusionAuth::ClientResponse] The ClientResponse object.
|
2423
|
+
def retrieve_message_template_preview(request)
|
2424
|
+
start.uri('/api/message/template/preview')
|
2425
|
+
.body_handler(FusionAuth::JSONBodyHandler.new(request))
|
2426
|
+
.post()
|
2427
|
+
.go()
|
2428
|
+
end
|
2429
|
+
|
2430
|
+
#
|
2431
|
+
# Retrieves all of the message templates.
|
2432
|
+
#
|
2433
|
+
# @return [FusionAuth::ClientResponse] The ClientResponse object.
|
2434
|
+
def retrieve_message_templates()
|
2435
|
+
start.uri('/api/message/template')
|
2436
|
+
.get()
|
2437
|
+
.go()
|
2438
|
+
end
|
2439
|
+
|
2440
|
+
#
|
2441
|
+
# Retrieves the messenger with the given Id.
|
2442
|
+
#
|
2443
|
+
# @param messenger_id [string] The Id of the messenger.
|
2444
|
+
# @return [FusionAuth::ClientResponse] The ClientResponse object.
|
2445
|
+
def retrieve_messenger(messenger_id)
|
2446
|
+
start.uri('/api/messenger')
|
2447
|
+
.url_segment(messenger_id)
|
2448
|
+
.get()
|
2449
|
+
.go()
|
2450
|
+
end
|
2451
|
+
|
2452
|
+
#
|
2453
|
+
# Retrieves all of the messengers.
|
2454
|
+
#
|
2455
|
+
# @return [FusionAuth::ClientResponse] The ClientResponse object.
|
2456
|
+
def retrieve_messengers()
|
2457
|
+
start.uri('/api/messenger')
|
2458
|
+
.get()
|
2459
|
+
.go()
|
2460
|
+
end
|
2461
|
+
|
2029
2462
|
#
|
2030
2463
|
# Retrieves the monthly active user report between the two instants. If you specify an application id, it will only
|
2031
2464
|
# return the monthly active counts for that application.
|
@@ -2105,6 +2538,16 @@ module FusionAuth
|
|
2105
2538
|
.go()
|
2106
2539
|
end
|
2107
2540
|
|
2541
|
+
#
|
2542
|
+
# Retrieves the FusionAuth Reactor status.
|
2543
|
+
#
|
2544
|
+
# @return [FusionAuth::ClientResponse] The ClientResponse object.
|
2545
|
+
def retrieve_reactor_status()
|
2546
|
+
start.uri('/api/reactor')
|
2547
|
+
.get()
|
2548
|
+
.go()
|
2549
|
+
end
|
2550
|
+
|
2108
2551
|
#
|
2109
2552
|
# Retrieves the last number of login records.
|
2110
2553
|
#
|
@@ -2119,6 +2562,18 @@ module FusionAuth
|
|
2119
2562
|
.go()
|
2120
2563
|
end
|
2121
2564
|
|
2565
|
+
#
|
2566
|
+
# 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..
|
2567
|
+
#
|
2568
|
+
# @param user_id [string] The Id of the user.
|
2569
|
+
# @return [FusionAuth::ClientResponse] The ClientResponse object.
|
2570
|
+
def retrieve_refresh_token_by_id(user_id)
|
2571
|
+
start.uri('/api/jwt/refresh')
|
2572
|
+
.url_segment(user_id)
|
2573
|
+
.get()
|
2574
|
+
.go()
|
2575
|
+
end
|
2576
|
+
|
2122
2577
|
#
|
2123
2578
|
# Retrieves the refresh tokens that belong to the user with the given Id.
|
2124
2579
|
#
|
@@ -2227,6 +2682,18 @@ module FusionAuth
|
|
2227
2682
|
.go()
|
2228
2683
|
end
|
2229
2684
|
|
2685
|
+
#
|
2686
|
+
# Retrieve two-factor recovery codes for a user.
|
2687
|
+
#
|
2688
|
+
# @param user_id [string] The Id of the user to retrieve Two Factor recovery codes.
|
2689
|
+
# @return [FusionAuth::ClientResponse] The ClientResponse object.
|
2690
|
+
def retrieve_two_factor_recovery_codes(user_id)
|
2691
|
+
start.uri('/api/user/two-factor/recovery-code')
|
2692
|
+
.url_segment(user_id)
|
2693
|
+
.get()
|
2694
|
+
.go()
|
2695
|
+
end
|
2696
|
+
|
2230
2697
|
#
|
2231
2698
|
# Retrieves the user for the given Id.
|
2232
2699
|
#
|
@@ -2461,6 +2928,16 @@ module FusionAuth
|
|
2461
2928
|
.go()
|
2462
2929
|
end
|
2463
2930
|
|
2931
|
+
#
|
2932
|
+
# Retrieves the FusionAuth version string.
|
2933
|
+
#
|
2934
|
+
# @return [FusionAuth::ClientResponse] The ClientResponse object.
|
2935
|
+
def retrieve_version()
|
2936
|
+
start.uri('/api/system/version')
|
2937
|
+
.get()
|
2938
|
+
.go()
|
2939
|
+
end
|
2940
|
+
|
2464
2941
|
#
|
2465
2942
|
# Retrieves the webhook for the given Id. If you pass in null for the id, this will return all the webhooks.
|
2466
2943
|
#
|
@@ -2608,6 +3085,54 @@ module FusionAuth
|
|
2608
3085
|
.go()
|
2609
3086
|
end
|
2610
3087
|
|
3088
|
+
#
|
3089
|
+
# Searches entities with the specified criteria and pagination.
|
3090
|
+
#
|
3091
|
+
# @param request [OpenStruct, Hash] The search criteria and pagination information.
|
3092
|
+
# @return [FusionAuth::ClientResponse] The ClientResponse object.
|
3093
|
+
def search_entities(request)
|
3094
|
+
start.uri('/api/entity/search')
|
3095
|
+
.body_handler(FusionAuth::JSONBodyHandler.new(request))
|
3096
|
+
.post()
|
3097
|
+
.go()
|
3098
|
+
end
|
3099
|
+
|
3100
|
+
#
|
3101
|
+
# Retrieves the entities for the given ids. If any id is invalid, it is ignored.
|
3102
|
+
#
|
3103
|
+
# @param ids [Array] The entity ids to search for.
|
3104
|
+
# @return [FusionAuth::ClientResponse] The ClientResponse object.
|
3105
|
+
def search_entities_by_ids(ids)
|
3106
|
+
start.uri('/api/entity/search')
|
3107
|
+
.url_parameter('ids', ids)
|
3108
|
+
.get()
|
3109
|
+
.go()
|
3110
|
+
end
|
3111
|
+
|
3112
|
+
#
|
3113
|
+
# Searches Entity Grants with the specified criteria and pagination.
|
3114
|
+
#
|
3115
|
+
# @param request [OpenStruct, Hash] The search criteria and pagination information.
|
3116
|
+
# @return [FusionAuth::ClientResponse] The ClientResponse object.
|
3117
|
+
def search_entity_grants(request)
|
3118
|
+
start.uri('/api/entity/grant/search')
|
3119
|
+
.body_handler(FusionAuth::JSONBodyHandler.new(request))
|
3120
|
+
.post()
|
3121
|
+
.go()
|
3122
|
+
end
|
3123
|
+
|
3124
|
+
#
|
3125
|
+
# Searches the entity types with the specified criteria and pagination.
|
3126
|
+
#
|
3127
|
+
# @param request [OpenStruct, Hash] The search criteria and pagination information.
|
3128
|
+
# @return [FusionAuth::ClientResponse] The ClientResponse object.
|
3129
|
+
def search_entity_types(request)
|
3130
|
+
start.uri('/api/entity/type/search')
|
3131
|
+
.body_handler(FusionAuth::JSONBodyHandler.new(request))
|
3132
|
+
.post()
|
3133
|
+
.go()
|
3134
|
+
end
|
3135
|
+
|
2611
3136
|
#
|
2612
3137
|
# Searches the event logs with the specified criteria and pagination.
|
2613
3138
|
#
|
@@ -2728,6 +3253,7 @@ module FusionAuth
|
|
2728
3253
|
#
|
2729
3254
|
# @param request [OpenStruct, Hash] The request object that contains all of the information used to send the code.
|
2730
3255
|
# @return [FusionAuth::ClientResponse] The ClientResponse object.
|
3256
|
+
# @deprecated This method has been renamed to send_two_factor_code_for_enable_disable, use that method instead.
|
2731
3257
|
def send_two_factor_code(request)
|
2732
3258
|
start.uri('/api/two-factor/send')
|
2733
3259
|
.body_handler(FusionAuth::JSONBodyHandler.new(request))
|
@@ -2735,11 +3261,24 @@ module FusionAuth
|
|
2735
3261
|
.go()
|
2736
3262
|
end
|
2737
3263
|
|
3264
|
+
#
|
3265
|
+
# Send a Two Factor authentication code to assist in setting up Two Factor authentication or disabling.
|
3266
|
+
#
|
3267
|
+
# @param request [OpenStruct, Hash] The request object that contains all of the information used to send the code.
|
3268
|
+
# @return [FusionAuth::ClientResponse] The ClientResponse object.
|
3269
|
+
def send_two_factor_code_for_enable_disable(request)
|
3270
|
+
start.uri('/api/two-factor/send')
|
3271
|
+
.body_handler(FusionAuth::JSONBodyHandler.new(request))
|
3272
|
+
.post()
|
3273
|
+
.go()
|
3274
|
+
end
|
3275
|
+
|
2738
3276
|
#
|
2739
3277
|
# Send a Two Factor authentication code to allow the completion of Two Factor authentication.
|
2740
3278
|
#
|
2741
3279
|
# @param two_factor_id [string] The Id returned by the Login API necessary to complete Two Factor authentication.
|
2742
3280
|
# @return [FusionAuth::ClientResponse] The ClientResponse object.
|
3281
|
+
# @deprecated This method has been renamed to send_two_factor_code_for_login_using_method, use that method instead.
|
2743
3282
|
def send_two_factor_code_for_login(two_factor_id)
|
2744
3283
|
startAnonymous.uri('/api/two-factor/send')
|
2745
3284
|
.url_segment(two_factor_id)
|
@@ -2747,6 +3286,20 @@ module FusionAuth
|
|
2747
3286
|
.go()
|
2748
3287
|
end
|
2749
3288
|
|
3289
|
+
#
|
3290
|
+
# Send a Two Factor authentication code to allow the completion of Two Factor authentication.
|
3291
|
+
#
|
3292
|
+
# @param two_factor_id [string] The Id returned by the Login API necessary to complete Two Factor authentication.
|
3293
|
+
# @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.
|
3294
|
+
# @return [FusionAuth::ClientResponse] The ClientResponse object.
|
3295
|
+
def send_two_factor_code_for_login_using_method(two_factor_id, request)
|
3296
|
+
startAnonymous.uri('/api/two-factor/send')
|
3297
|
+
.url_segment(two_factor_id)
|
3298
|
+
.body_handler(FusionAuth::JSONBodyHandler.new(request))
|
3299
|
+
.post()
|
3300
|
+
.go()
|
3301
|
+
end
|
3302
|
+
|
2750
3303
|
#
|
2751
3304
|
# Begins a login request for a 3rd party login that requires user interaction such as HYPR.
|
2752
3305
|
#
|
@@ -2773,6 +3326,23 @@ module FusionAuth
|
|
2773
3326
|
.go()
|
2774
3327
|
end
|
2775
3328
|
|
3329
|
+
#
|
3330
|
+
# Start a Two-Factor login request by generating a two-factor identifier. This code can then be sent to the Two Factor Send
|
3331
|
+
# 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
|
3332
|
+
# to send the code out-of-band. The Two-Factor login is completed by making a request to the Two-Factor Login
|
3333
|
+
# API (/api/two-factor/login). with the two-factor identifier and the one-time use code.
|
3334
|
+
#
|
3335
|
+
# 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).
|
3336
|
+
#
|
3337
|
+
# @param request [OpenStruct, Hash] The Two-Factor start request that contains all of the information used to begin the Two-Factor login request.
|
3338
|
+
# @return [FusionAuth::ClientResponse] The ClientResponse object.
|
3339
|
+
def start_two_factor_login(request)
|
3340
|
+
start.uri('/api/two-factor/start')
|
3341
|
+
.body_handler(FusionAuth::JSONBodyHandler.new(request))
|
3342
|
+
.post()
|
3343
|
+
.go()
|
3344
|
+
end
|
3345
|
+
|
2776
3346
|
#
|
2777
3347
|
# Complete login using a 2FA challenge
|
2778
3348
|
#
|
@@ -2785,6 +3355,20 @@ module FusionAuth
|
|
2785
3355
|
.go()
|
2786
3356
|
end
|
2787
3357
|
|
3358
|
+
#
|
3359
|
+
# Updates an API key by given id
|
3360
|
+
#
|
3361
|
+
# @param api_key_id [string] The Id of the API key to update.
|
3362
|
+
# @param request [OpenStruct, Hash] The request object that contains all of the information used to create the API Key.
|
3363
|
+
# @return [FusionAuth::ClientResponse] The ClientResponse object.
|
3364
|
+
def update_api_key(api_key_id, request)
|
3365
|
+
start.uri('/api/api-key')
|
3366
|
+
.url_segment(api_key_id)
|
3367
|
+
.body_handler(FusionAuth::JSONBodyHandler.new(request))
|
3368
|
+
.put()
|
3369
|
+
.go()
|
3370
|
+
end
|
3371
|
+
|
2788
3372
|
#
|
2789
3373
|
# Updates the application with the given Id.
|
2790
3374
|
#
|
@@ -2858,6 +3442,51 @@ module FusionAuth
|
|
2858
3442
|
.go()
|
2859
3443
|
end
|
2860
3444
|
|
3445
|
+
#
|
3446
|
+
# Updates the Entity with the given Id.
|
3447
|
+
#
|
3448
|
+
# @param entity_id [string] The Id of the Entity to update.
|
3449
|
+
# @param request [OpenStruct, Hash] The request that contains all of the new Entity information.
|
3450
|
+
# @return [FusionAuth::ClientResponse] The ClientResponse object.
|
3451
|
+
def update_entity(entity_id, request)
|
3452
|
+
start.uri('/api/entity')
|
3453
|
+
.url_segment(entity_id)
|
3454
|
+
.body_handler(FusionAuth::JSONBodyHandler.new(request))
|
3455
|
+
.put()
|
3456
|
+
.go()
|
3457
|
+
end
|
3458
|
+
|
3459
|
+
#
|
3460
|
+
# Updates the Entity Type with the given Id.
|
3461
|
+
#
|
3462
|
+
# @param entity_type_id [string] The Id of the Entity Type to update.
|
3463
|
+
# @param request [OpenStruct, Hash] The request that contains all of the new Entity Type information.
|
3464
|
+
# @return [FusionAuth::ClientResponse] The ClientResponse object.
|
3465
|
+
def update_entity_type(entity_type_id, request)
|
3466
|
+
start.uri('/api/entity/type')
|
3467
|
+
.url_segment(entity_type_id)
|
3468
|
+
.body_handler(FusionAuth::JSONBodyHandler.new(request))
|
3469
|
+
.put()
|
3470
|
+
.go()
|
3471
|
+
end
|
3472
|
+
|
3473
|
+
#
|
3474
|
+
# Updates the permission with the given id for the entity type.
|
3475
|
+
#
|
3476
|
+
# @param entity_type_id [string] The Id of the entityType that the permission belongs to.
|
3477
|
+
# @param permission_id [string] The Id of the permission to update.
|
3478
|
+
# @param request [OpenStruct, Hash] The request that contains all of the new permission information.
|
3479
|
+
# @return [FusionAuth::ClientResponse] The ClientResponse object.
|
3480
|
+
def update_entity_type_permission(entity_type_id, permission_id, request)
|
3481
|
+
start.uri('/api/entity/type')
|
3482
|
+
.url_segment(entity_type_id)
|
3483
|
+
.url_segment("permission")
|
3484
|
+
.url_segment(permission_id)
|
3485
|
+
.body_handler(FusionAuth::JSONBodyHandler.new(request))
|
3486
|
+
.put()
|
3487
|
+
.go()
|
3488
|
+
end
|
3489
|
+
|
2861
3490
|
#
|
2862
3491
|
# Updates the form with the given Id.
|
2863
3492
|
#
|
@@ -2954,6 +3583,34 @@ module FusionAuth
|
|
2954
3583
|
.go()
|
2955
3584
|
end
|
2956
3585
|
|
3586
|
+
#
|
3587
|
+
# Updates the message template with the given Id.
|
3588
|
+
#
|
3589
|
+
# @param message_template_id [string] The Id of the message template to update.
|
3590
|
+
# @param request [OpenStruct, Hash] The request that contains all of the new message template information.
|
3591
|
+
# @return [FusionAuth::ClientResponse] The ClientResponse object.
|
3592
|
+
def update_message_template(message_template_id, request)
|
3593
|
+
start.uri('/api/message/template')
|
3594
|
+
.url_segment(message_template_id)
|
3595
|
+
.body_handler(FusionAuth::JSONBodyHandler.new(request))
|
3596
|
+
.put()
|
3597
|
+
.go()
|
3598
|
+
end
|
3599
|
+
|
3600
|
+
#
|
3601
|
+
# Updates the messenger with the given Id.
|
3602
|
+
#
|
3603
|
+
# @param messenger_id [string] The Id of the messenger to update.
|
3604
|
+
# @param request [OpenStruct, Hash] The request object that contains all of the new messenger information.
|
3605
|
+
# @return [FusionAuth::ClientResponse] The ClientResponse object.
|
3606
|
+
def update_messenger(messenger_id, request)
|
3607
|
+
start.uri('/api/messenger')
|
3608
|
+
.url_segment(messenger_id)
|
3609
|
+
.body_handler(FusionAuth::JSONBodyHandler.new(request))
|
3610
|
+
.put()
|
3611
|
+
.go()
|
3612
|
+
end
|
3613
|
+
|
2957
3614
|
#
|
2958
3615
|
# Updates the registration for the user with the given id and the application defined in the request.
|
2959
3616
|
#
|
@@ -3078,6 +3735,21 @@ module FusionAuth
|
|
3078
3735
|
.go()
|
3079
3736
|
end
|
3080
3737
|
|
3738
|
+
#
|
3739
|
+
# Creates or updates an Entity Grant. This is when a User/Entity is granted permissions to an Entity.
|
3740
|
+
#
|
3741
|
+
# @param entity_id [string] The Id of the Entity that the User/Entity is being granted access to.
|
3742
|
+
# @param request [OpenStruct, Hash] The request object that contains all of the information used to create the Entity Grant.
|
3743
|
+
# @return [FusionAuth::ClientResponse] The ClientResponse object.
|
3744
|
+
def upsert_entity_grant(entity_id, request)
|
3745
|
+
start.uri('/api/entity')
|
3746
|
+
.url_segment(entity_id)
|
3747
|
+
.url_segment("grant")
|
3748
|
+
.body_handler(FusionAuth::JSONBodyHandler.new(request))
|
3749
|
+
.post()
|
3750
|
+
.go()
|
3751
|
+
end
|
3752
|
+
|
3081
3753
|
#
|
3082
3754
|
# Validates the end-user provided user_code from the user-interaction of the Device Authorization Grant.
|
3083
3755
|
# If you build your own activation form you should validate the user provided code prior to beginning the Authorization grant.
|
@@ -3113,6 +3785,7 @@ module FusionAuth
|
|
3113
3785
|
#
|
3114
3786
|
# @param verification_id [string] The email verification id sent to the user.
|
3115
3787
|
# @return [FusionAuth::ClientResponse] The ClientResponse object.
|
3788
|
+
# @deprecated This method has been renamed to verify_email_address and changed to take a JSON request body, use that method instead.
|
3116
3789
|
def verify_email(verification_id)
|
3117
3790
|
startAnonymous.uri('/api/user/verify-email')
|
3118
3791
|
.url_segment(verification_id)
|
@@ -3120,11 +3793,29 @@ module FusionAuth
|
|
3120
3793
|
.go()
|
3121
3794
|
end
|
3122
3795
|
|
3796
|
+
#
|
3797
|
+
# Confirms a user's email address.
|
3798
|
+
#
|
3799
|
+
# The request body will contain the verificationId. You may also be required to send a one-time use code based upon your configuration. When
|
3800
|
+
# the tenant is configured to gate a user until their email address is verified, this procedures requires two values instead of one.
|
3801
|
+
# The verificationId is a high entropy value and the one-time use code is a low entropy value that is easily entered in a user interactive form. The
|
3802
|
+
# two values together are able to confirm a user's email address and mark the user's email address as verified.
|
3803
|
+
#
|
3804
|
+
# @param request [OpenStruct, Hash] The request that contains the verificationId and optional one-time use code paired with the verificationId.
|
3805
|
+
# @return [FusionAuth::ClientResponse] The ClientResponse object.
|
3806
|
+
def verify_email_address(request)
|
3807
|
+
startAnonymous.uri('/api/user/verify-email')
|
3808
|
+
.body_handler(FusionAuth::JSONBodyHandler.new(request))
|
3809
|
+
.post()
|
3810
|
+
.go()
|
3811
|
+
end
|
3812
|
+
|
3123
3813
|
#
|
3124
3814
|
# Confirms an application registration. The Id given is usually from an email sent to the user.
|
3125
3815
|
#
|
3126
3816
|
# @param verification_id [string] The registration verification Id sent to the user.
|
3127
3817
|
# @return [FusionAuth::ClientResponse] The ClientResponse object.
|
3818
|
+
# @deprecated This method has been renamed to verify_user_registration and changed to take a JSON request body, use that method instead.
|
3128
3819
|
def verify_registration(verification_id)
|
3129
3820
|
startAnonymous.uri('/api/user/verify-registration')
|
3130
3821
|
.url_segment(verification_id)
|
@@ -3132,6 +3823,23 @@ module FusionAuth
|
|
3132
3823
|
.go()
|
3133
3824
|
end
|
3134
3825
|
|
3826
|
+
#
|
3827
|
+
# Confirms a user's registration.
|
3828
|
+
#
|
3829
|
+
# The request body will contain the verificationId. You may also be required to send a one-time use code based upon your configuration. When
|
3830
|
+
# the application is configured to gate a user until their registration is verified, this procedures requires two values instead of one.
|
3831
|
+
# The verificationId is a high entropy value and the one-time use code is a low entropy value that is easily entered in a user interactive form. The
|
3832
|
+
# two values together are able to confirm a user's registration and mark the user's registration as verified.
|
3833
|
+
#
|
3834
|
+
# @param request [OpenStruct, Hash] The request that contains the verificationId and optional one-time use code paired with the verificationId.
|
3835
|
+
# @return [FusionAuth::ClientResponse] The ClientResponse object.
|
3836
|
+
def verify_user_registration(request)
|
3837
|
+
startAnonymous.uri('/api/user/verify-registration')
|
3838
|
+
.body_handler(FusionAuth::JSONBodyHandler.new(request))
|
3839
|
+
.post()
|
3840
|
+
.go()
|
3841
|
+
end
|
3842
|
+
|
3135
3843
|
#
|
3136
3844
|
# Starts the HTTP call
|
3137
3845
|
#
|
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.
|
4
|
+
version: 1.27.2
|
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-
|
12
|
+
date: 2021-05-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.
|
@@ -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
|