fusionauth_client 1.17.0 → 1.18.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f91a54dc500875d697bca113a8dfd213c8c4de1f4ac8b4cc8ee3eb605b83d98d
4
- data.tar.gz: 05d4ed2eb2a09ee56a4d995115682d8661964b70b403bb88304a1bfcf5e4e810
3
+ metadata.gz: 21109a2d8e1bd5cb1229077c02415245b6f04574e91f05240cce4ad5900eb0eb
4
+ data.tar.gz: 971f1406ab820d744161bebaf1d427c665963789dd129bac32b092c05d8816ac
5
5
  SHA512:
6
- metadata.gz: 1570fbff542d1f5d7a4ed1c6168ac5a8264e6e97bdd7eaa560257ce6796ff7562cf81bbbe74310a0e997f016e055d7911d1e541d784f5048ea14ad4c851c8f80
7
- data.tar.gz: d46ff0619da3c0d70ae9093f3a338216390286048b731ee336e785bab72b726d80c4e50230ebe8e847e708f98ffeeaa5f5dfd1339ecac0f28db743c7af1a28b9
6
+ metadata.gz: be173c20a7f84ce6c0155c6a6d3cbcdfc7114fde73b7698bbc61f3fa18731a55db4418ca8c2a42efa50b9bacda58726d0668d724bcdc6bac87ec8741dfcca3a4
7
+ data.tar.gz: 5c3f0faa5560a56daf6a4ee2bee68c448896ee529fab405507a258669f99d3a91e0430c12056ed76d9345978b5ff62db47243931e683769d041a7be82864dd7b
@@ -1 +1 @@
1
- 2.3.1
1
+ 2.5.1
data/Gemfile CHANGED
@@ -13,7 +13,7 @@
13
13
  # language governing permissions and limitations under the License.
14
14
 
15
15
  source 'https://rubygems.org'
16
- ruby '2.3.1'
16
+ ruby '2.5.1'
17
17
 
18
18
  gem "rake", "12.3.3"
19
19
  gem "minitest", "5.8.3"
data/README.md CHANGED
@@ -33,7 +33,7 @@ client = FusionAuth::FusionAuthClient.new(
33
33
 
34
34
  # Create a user + registration
35
35
  id = SecureRandom.uuid
36
- client.register!(id, {
36
+ client.register(id, {
37
37
  :user => {
38
38
  :firstName => 'Ruby',
39
39
  :lastName => 'Client',
@@ -51,12 +51,12 @@ client.register!(id, {
51
51
  })
52
52
 
53
53
  # Authenticate the user
54
- response = client.login!({
54
+ response = client.login({
55
55
  :loginId => 'ruby.client.test@fusionauth.io',
56
56
  :password => 'password',
57
57
  :applicationId => application_id
58
58
  })
59
- user = response.user
59
+ user = response.success.response.user
60
60
  ```
61
61
 
62
62
  ## Contributing
@@ -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.17.0", licenses: ["ApacheV2_0"]) {
19
+ project(group: "io.fusionauth", name: "fusionauth-ruby-client", version: "1.18.0", licenses: ["ApacheV2_0"]) {
20
20
  workflow {
21
21
  standard()
22
22
  }
@@ -6,10 +6,10 @@
6
6
  <sourceFolder url="file://$MODULE_DIR$/lib" isTestSource="false" />
7
7
  <sourceFolder url="file://$MODULE_DIR$/test" isTestSource="true" />
8
8
  </content>
9
- <orderEntry type="jdk" jdkName="rbenv: 2.3.1" jdkType="RUBY_SDK" />
9
+ <orderEntry type="jdk" jdkName="rbenv: 2.5.1" jdkType="RUBY_SDK" />
10
10
  <orderEntry type="sourceFolder" forTests="false" />
11
- <orderEntry type="library" scope="PROVIDED" name="bundler (v2.0.2, rbenv: 2.3.1) [gem]" level="application" />
12
- <orderEntry type="library" scope="PROVIDED" name="minitest (v5.8.3, rbenv: 2.3.1) [gem]" level="application" />
13
- <orderEntry type="library" scope="PROVIDED" name="rake (v12.3.3, rbenv: 2.3.1) [gem]" level="application" />
11
+ <orderEntry type="library" scope="PROVIDED" name="bundler (v2.1.4, rbenv: 2.5.1) [gem]" level="application" />
12
+ <orderEntry type="library" scope="PROVIDED" name="minitest (v5.8.3, rbenv: 2.5.1) [gem]" level="application" />
13
+ <orderEntry type="library" scope="PROVIDED" name="rake (v12.3.3, rbenv: 2.5.1) [gem]" level="application" />
14
14
  </component>
15
15
  </module>
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = 'fusionauth_client'
7
- spec.version = '1.17.0'
7
+ spec.version = '1.18.0'
8
8
  spec.authors = ['Brian Pontarelli', 'Daniel DeGroff']
9
9
  spec.email = %w(brian@fusionauth.io daniel@fusionauth.io)
10
10
 
@@ -170,6 +170,20 @@ module FusionAuth
170
170
  .go()
171
171
  end
172
172
 
173
+ #
174
+ # Creates a connector. You can optionally specify an Id for the connector, if not provided one will be generated.
175
+ #
176
+ # @param connector_id [string] (Optional) The Id for the connector. If not provided a secure random UUID will be generated.
177
+ # @param request [OpenStruct, Hash] The request object that contains all of the information used to create the connector.
178
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
179
+ def create_connector(connector_id, request)
180
+ start.uri('/api/connector')
181
+ .url_segment(connector_id)
182
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
183
+ .post()
184
+ .go()
185
+ end
186
+
173
187
  #
174
188
  # Creates a user consent type. You can optionally specify an Id for the consent type, if not provided one will be generated.
175
189
  #
@@ -213,6 +227,34 @@ module FusionAuth
213
227
  .go()
214
228
  end
215
229
 
230
+ #
231
+ # Creates a form. You can optionally specify an Id for the form, if not provided one will be generated.
232
+ #
233
+ # @param form_id [string] (Optional) The Id for the form. If not provided a secure random UUID will be generated.
234
+ # @param request [OpenStruct, Hash] The request object that contains all of the information used to create the form.
235
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
236
+ def create_form(form_id, request)
237
+ start.uri('/api/form')
238
+ .url_segment(form_id)
239
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
240
+ .post()
241
+ .go()
242
+ end
243
+
244
+ #
245
+ # Creates a form field. You can optionally specify an Id for the form, if not provided one will be generated.
246
+ #
247
+ # @param field_id [string] (Optional) The Id for the form field. If not provided a secure random UUID will be generated.
248
+ # @param request [OpenStruct, Hash] The request object that contains all of the information used to create the form field.
249
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
250
+ def create_form_field(field_id, request)
251
+ start.uri('/api/form/field')
252
+ .url_segment(field_id)
253
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
254
+ .post()
255
+ .go()
256
+ end
257
+
216
258
  #
217
259
  # Creates a group. You can optionally specify an Id for the group, if not provided one will be generated.
218
260
  #
@@ -464,6 +506,18 @@ module FusionAuth
464
506
  .go()
465
507
  end
466
508
 
509
+ #
510
+ # Deletes the connector for the given Id.
511
+ #
512
+ # @param connector_id [string] The Id of the connector to delete.
513
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
514
+ def delete_connector(connector_id)
515
+ start.uri('/api/connector')
516
+ .url_segment(connector_id)
517
+ .delete()
518
+ .go()
519
+ end
520
+
467
521
  #
468
522
  # Deletes the consent for the given Id.
469
523
  #
@@ -488,6 +542,30 @@ module FusionAuth
488
542
  .go()
489
543
  end
490
544
 
545
+ #
546
+ # Deletes the form for the given Id.
547
+ #
548
+ # @param form_id [string] The Id of the form to delete.
549
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
550
+ def delete_form(form_id)
551
+ start.uri('/api/form')
552
+ .url_segment(form_id)
553
+ .delete()
554
+ .go()
555
+ end
556
+
557
+ #
558
+ # Deletes the form field for the given Id.
559
+ #
560
+ # @param field_id [string] The Id of the form field to delete.
561
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
562
+ def delete_form_field(field_id)
563
+ start.uri('/api/form/field')
564
+ .url_segment(field_id)
565
+ .delete()
566
+ .go()
567
+ end
568
+
491
569
  #
492
570
  # Deletes the group for the given Id.
493
571
  #
@@ -527,11 +605,11 @@ module FusionAuth
527
605
  #
528
606
  # Deletes the key for the given Id.
529
607
  #
530
- # @param key_od [string] The Id of the key to delete.
608
+ # @param key_id [string] The Id of the key to delete.
531
609
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
532
- def delete_key(key_od)
610
+ def delete_key(key_id)
533
611
  start.uri('/api/key')
534
- .url_segment(key_od)
612
+ .url_segment(key_id)
535
613
  .delete()
536
614
  .go()
537
615
  end
@@ -1055,6 +1133,20 @@ module FusionAuth
1055
1133
  .go()
1056
1134
  end
1057
1135
 
1136
+ #
1137
+ # Updates, via PATCH, the connector with the given Id.
1138
+ #
1139
+ # @param connector_id [string] The Id of the connector to update.
1140
+ # @param request [OpenStruct, Hash] The request that contains just the new connector information.
1141
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
1142
+ def patch_connector(connector_id, request)
1143
+ start.uri('/api/connector')
1144
+ .url_segment(connector_id)
1145
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
1146
+ .patch()
1147
+ .go()
1148
+ end
1149
+
1058
1150
  #
1059
1151
  # Updates, via PATCH, the consent with the given Id.
1060
1152
  #
@@ -1455,6 +1547,28 @@ module FusionAuth
1455
1547
  .go()
1456
1548
  end
1457
1549
 
1550
+ #
1551
+ # Retrieves the connector with the given Id.
1552
+ #
1553
+ # @param connector_id [string] The Id of the connector.
1554
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
1555
+ def retrieve_connector(connector_id)
1556
+ start.uri('/api/connector')
1557
+ .url_segment(connector_id)
1558
+ .get()
1559
+ .go()
1560
+ end
1561
+
1562
+ #
1563
+ # Retrieves all of the connectors.
1564
+ #
1565
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
1566
+ def retrieve_connectors()
1567
+ start.uri('/api/connector')
1568
+ .get()
1569
+ .go()
1570
+ end
1571
+
1458
1572
  #
1459
1573
  # Retrieves the Consent for the given Id.
1460
1574
  #
@@ -1566,6 +1680,50 @@ module FusionAuth
1566
1680
  .go()
1567
1681
  end
1568
1682
 
1683
+ #
1684
+ # Retrieves the form with the given Id.
1685
+ #
1686
+ # @param form_id [string] The Id of the form.
1687
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
1688
+ def retrieve_form(form_id)
1689
+ start.uri('/api/form')
1690
+ .url_segment(form_id)
1691
+ .get()
1692
+ .go()
1693
+ end
1694
+
1695
+ #
1696
+ # Retrieves the form field with the given Id.
1697
+ #
1698
+ # @param field_id [string] The Id of the form field.
1699
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
1700
+ def retrieve_form_field(field_id)
1701
+ start.uri('/api/form/field')
1702
+ .url_segment(field_id)
1703
+ .get()
1704
+ .go()
1705
+ end
1706
+
1707
+ #
1708
+ # Retrieves all of the forms fields
1709
+ #
1710
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
1711
+ def retrieve_form_fields()
1712
+ start.uri('/api/form/field')
1713
+ .get()
1714
+ .go()
1715
+ end
1716
+
1717
+ #
1718
+ # Retrieves all of the forms.
1719
+ #
1720
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
1721
+ def retrieve_forms()
1722
+ start.uri('/api/form')
1723
+ .get()
1724
+ .go()
1725
+ end
1726
+
1569
1727
  #
1570
1728
  # Retrieves the group for the given Id.
1571
1729
  #
@@ -2467,6 +2625,20 @@ module FusionAuth
2467
2625
  .go()
2468
2626
  end
2469
2627
 
2628
+ #
2629
+ # Updates the connector with the given Id.
2630
+ #
2631
+ # @param connector_id [string] The Id of the connector to update.
2632
+ # @param request [OpenStruct, Hash] The request object that contains all of the new connector information.
2633
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
2634
+ def update_connector(connector_id, request)
2635
+ start.uri('/api/connector')
2636
+ .url_segment(connector_id)
2637
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
2638
+ .put()
2639
+ .go()
2640
+ end
2641
+
2470
2642
  #
2471
2643
  # Updates the consent with the given Id.
2472
2644
  #
@@ -2495,6 +2667,34 @@ module FusionAuth
2495
2667
  .go()
2496
2668
  end
2497
2669
 
2670
+ #
2671
+ # Updates the form with the given Id.
2672
+ #
2673
+ # @param form_id [string] The Id of the form to update.
2674
+ # @param request [OpenStruct, Hash] The request object that contains all of the new form information.
2675
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
2676
+ def update_form(form_id, request)
2677
+ start.uri('/api/form')
2678
+ .url_segment(form_id)
2679
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
2680
+ .put()
2681
+ .go()
2682
+ end
2683
+
2684
+ #
2685
+ # Updates the form field with the given Id.
2686
+ #
2687
+ # @param field_id [string] The Id of the form field to update.
2688
+ # @param request [OpenStruct, Hash] The request object that contains all of the new form field information.
2689
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
2690
+ def update_form_field(field_id, request)
2691
+ start.uri('/api/form/field')
2692
+ .url_segment(field_id)
2693
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
2694
+ .put()
2695
+ .go()
2696
+ end
2697
+
2498
2698
  #
2499
2699
  # Updates the group with the given Id.
2500
2700
  #
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.17.0
4
+ version: 1.18.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Pontarelli
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2020-06-02 00:00:00.000000000 Z
12
+ date: 2020-07-19 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.
@@ -51,7 +51,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
51
51
  - !ruby/object:Gem::Version
52
52
  version: '0'
53
53
  requirements: []
54
- rubygems_version: 3.0.2
54
+ rubygems_version: 3.1.4
55
55
  signing_key:
56
56
  specification_version: 4
57
57
  summary: The Ruby client library for FusionAuth