fusionauth_client 1.34.0 → 1.38.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 835c190bdd098d984b2b2d12b509bac233d06fe3ddd9ea164547f6e36dcbb252
4
- data.tar.gz: 6daa2a35b29cbc83750aeaf1403389d9739d5719fcc92443c7483408ad7db1c2
3
+ metadata.gz: 4bf2c4810a2d7c274cda24502f66fdca37b188a74e8799417cc549d9c06e23a0
4
+ data.tar.gz: b5aa5629f7120d7d4983de81bfddfc4127c0194a2061f1ed11366ab4820bf73d
5
5
  SHA512:
6
- metadata.gz: e957b952ab5de83f1b2cfda1847cb5cef605b38a1696825e97f80c45fb51c218d2d27e46264edbeed0b491ddb916a6364d953170ec823930c5e9eee465cfc12d
7
- data.tar.gz: f828049d36341da401b4cbff6b2170b649c2845e899477ea327b5c2e19be86cf76c9e7ec95c6f73a3dacb7b2401dee5b5104ec596849e153d8fc969eb1e0c7fd
6
+ metadata.gz: 36e2fb473ac870bd0f8b99a7c513c24bf60459d44e0b6dfc2eec1cad7cbb2ac3118e18df5b1df86ff2ffb151e4a55535e67e9c04a9ff5f587385ac145e2bffa9
7
+ data.tar.gz: a6ba3e7aca263497406c858e66faedc98405334015bf0b8a9f5a36fb807564afe996fceeb3ad4381648345f5d09e81ad881b1c8730dd828e2ffef388c13d919d
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- fusionauth_client (1.34.0)
4
+ fusionauth_client (1.38.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -20,50 +20,15 @@ Or install it yourself as:
20
20
 
21
21
  ## Usage
22
22
 
23
- Once the gem is installed, you can call FusionAuth APIs like this:
23
+ Once the gem is installed, you can call FusionAuth APIs.
24
24
 
25
- ```ruby
26
- require 'fusionauth/fusionauth_client'
27
-
28
- # Construct the FusionAuth Client
29
- client = FusionAuth::FusionAuthClient.new(
30
- '<YOUR_API_KEY>',
31
- 'http://localhost:9011'
32
- )
33
-
34
- # Create a user + registration
35
- id = SecureRandom.uuid
36
- client.register(id, {
37
- :user => {
38
- :firstName => 'Ruby',
39
- :lastName => 'Client',
40
- :email => 'ruby.client.test@fusionauth.io',
41
- :password => 'password'
42
- },
43
- :registration => {
44
- :applicationId => application_id,
45
- :data => {
46
- :foo => 'bar'
47
- },
48
- :preferredLanguages => %w(en fr),
49
- :roles => %w(user)
50
- }
51
- })
52
-
53
- # Authenticate the user
54
- response = client.login({
55
- :loginId => 'ruby.client.test@fusionauth.io',
56
- :password => 'password',
57
- :applicationId => application_id
58
- })
59
- user = response.success.response.user
60
- ```
25
+ See examples in the `examples` directory.
61
26
 
62
27
  ## Questions and support
63
28
 
64
29
  If you have a question or support issue regarding this client library, we'd love to hear from you.
65
30
 
66
- If you have a paid edition with support included, please [open a ticket in your account portal](https://account.fusionauth.io/account/support/). Learn more about [paid editions here](https://fusionauth.io/pricing/).
31
+ If you have a paid edition with support included, please [open a ticket in your account portal](https://account.fusionauth.io/account/support/). Learn more about [paid editions here](https://fusionauth.io/pricing).
67
32
 
68
33
  Otherwise, please [post your question in the community forum](https://fusionauth.io/community/forum/).
69
34
 
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.34.0", licenses: ["ApacheV2_0"]) {
19
+ project(group: "io.fusionauth", name: "fusionauth-ruby-client", version: "1.38.0", licenses: ["ApacheV2_0"]) {
20
20
  workflow {
21
21
  fetch {
22
22
  cache()
@@ -0,0 +1,35 @@
1
+ require 'fusionauth/fusionauth_client'
2
+ require 'securerandom'
3
+
4
+ # Construct the FusionAuth Client
5
+ client = FusionAuth::FusionAuthClient.new(
6
+ 'APIKEY',
7
+ 'http://localhost:9011'
8
+ )
9
+
10
+ application_id = '20ce6dac-b985-4c77-bb59-6369249f884b'
11
+
12
+ # Create a user + registration
13
+ id = SecureRandom.uuid
14
+ response = client.register(id, {
15
+ :user => {
16
+ :firstName => 'Ruby',
17
+ :lastName => 'Client',
18
+ :email => 'ruby.client.test@fusionauth.io',
19
+ :password => 'password'
20
+ },
21
+ :registration => {
22
+ :applicationId => application_id,
23
+ :data => {
24
+ :foo => 'bar'
25
+ },
26
+ :preferredLanguages => %w(en fr),
27
+ :roles => %w(user)
28
+ }
29
+ })
30
+
31
+ unless response.success_response
32
+ print response.error_response
33
+ exit
34
+ end
35
+
data/examples/login.rb ADDED
@@ -0,0 +1,24 @@
1
+ require 'fusionauth/fusionauth_client'
2
+ require 'securerandom'
3
+
4
+ # Construct the FusionAuth Client
5
+ client = FusionAuth::FusionAuthClient.new(
6
+ 'APIKEY',
7
+ 'http://localhost:9011'
8
+ )
9
+
10
+ application_id = '20ce6dac-b985-4c77-bb59-6369249f884b'
11
+
12
+ # Authenticate a user
13
+ response = client.login({
14
+ :loginId => 'ruby.client.test@fusionauth.io',
15
+ :password => 'password',
16
+ :applicationId => application_id
17
+ })
18
+
19
+ if response.success_response
20
+ user = response.success_response.user
21
+ print user.id
22
+ else
23
+ print response.error_response
24
+ end
@@ -9,22 +9,23 @@
9
9
  <orderEntry type="jdk" jdkName="rbenv: 2.5.9" jdkType="RUBY_SDK" />
10
10
  <orderEntry type="sourceFolder" forTests="false" />
11
11
  <orderEntry type="library" scope="PROVIDED" name="bundler (v2.2.5, rbenv: 2.5.9) [gem]" level="application" />
12
+ <orderEntry type="library" scope="PROVIDED" name="minitest (v5.8.3, rbenv: 2.5.9) [gem]" level="application" />
12
13
  <orderEntry type="library" scope="PROVIDED" name="rake (v12.3.3, rbenv: 2.5.9) [gem]" level="application" />
13
14
  </component>
14
15
  <component name="RakeTasksCache">
15
16
  <option name="myRootTask">
16
17
  <RakeTaskImpl id="rake">
17
18
  <subtasks>
18
- <RakeTaskImpl description="Build fusionauth_client-1.28.1.gem into the pkg directory" fullCommand="build" id="build" />
19
+ <RakeTaskImpl description="Build fusionauth_client-1.37.0.gem into the pkg directory" fullCommand="build" id="build" />
19
20
  <RakeTaskImpl description="Remove any temporary products" fullCommand="clean" id="clean" />
20
21
  <RakeTaskImpl description="Remove any generated files" fullCommand="clobber" id="clobber" />
21
- <RakeTaskImpl description="Build and install fusionauth_client-1.28.1.gem into system gems" fullCommand="install" id="install" />
22
+ <RakeTaskImpl description="Build and install fusionauth_client-1.37.0.gem into system gems" fullCommand="install" id="install" />
22
23
  <RakeTaskImpl id="install">
23
24
  <subtasks>
24
- <RakeTaskImpl description="Build and install fusionauth_client-1.28.1.gem into system gems without network access" fullCommand="install:local" id="local" />
25
+ <RakeTaskImpl description="Build and install fusionauth_client-1.37.0.gem into system gems without network access" fullCommand="install:local" id="local" />
25
26
  </subtasks>
26
27
  </RakeTaskImpl>
27
- <RakeTaskImpl description="Create tag v1.28.1 and build and push fusionauth_client-1.28.1.gem to https://rubygems.org" fullCommand="release[remote]" id="release[remote]" />
28
+ <RakeTaskImpl description="Create tag v1.37.0 and build and push fusionauth_client-1.37.0.gem to https://rubygems.org" fullCommand="release[remote]" id="release[remote]" />
28
29
  <RakeTaskImpl description="Run tests" fullCommand="test" id="test" />
29
30
  <RakeTaskImpl description="" fullCommand="default" id="default" />
30
31
  <RakeTaskImpl description="" fullCommand="release" id="release" />
@@ -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.34.0'
7
+ spec.version = '1.38.0'
8
8
  spec.authors = ['Brian Pontarelli', 'Daniel DeGroff']
9
9
  spec.email = %w(brian@fusionauth.io daniel@fusionauth.io)
10
10
 
@@ -2,7 +2,7 @@ require 'ostruct'
2
2
  require 'fusionauth/rest_client'
3
3
 
4
4
  #
5
- # Copyright (c) 2018-2019, FusionAuth, All Rights Reserved
5
+ # Copyright (c) 2018-2022, 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.
@@ -130,9 +130,9 @@ module FusionAuth
130
130
  #
131
131
  # Check to see if the user must obtain a Trust Token Id in order to complete a change password request.
132
132
  # When a user has enabled Two-Factor authentication, before you are allowed to use the Change Password API to change
133
- # your password, you must obtain a Truest Token by completing a Two-Factor Step-Up authentication.
133
+ # your password, you must obtain a Trust Token by completing a Two-Factor Step-Up authentication.
134
134
  #
135
- # An HTTP status code of 412 indicates that a Trust Token is required to make a POST request to this API.
135
+ # An HTTP status code of 400 with a general error code of [TrustTokenRequired] indicates that a Trust Token is required to make a POST request to this API.
136
136
  #
137
137
  # @param change_password_id [string] The change password Id used to find the user. This value is generated by FusionAuth once the change password workflow has been initiated.
138
138
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
@@ -146,9 +146,9 @@ module FusionAuth
146
146
  #
147
147
  # Check to see if the user must obtain a Trust Token Id in order to complete a change password request.
148
148
  # When a user has enabled Two-Factor authentication, before you are allowed to use the Change Password API to change
149
- # your password, you must obtain a Truest Token by completing a Two-Factor Step-Up authentication.
149
+ # your password, you must obtain a Trust Token by completing a Two-Factor Step-Up authentication.
150
150
  #
151
- # An HTTP status code of 412 indicates that a Trust Token is required to make a POST request to this API.
151
+ # An HTTP status code of 400 with a general error code of [TrustTokenRequired] indicates that a Trust Token is required to make a POST request to this API.
152
152
  #
153
153
  # @param encoded_jwt [string] The encoded JWT (access token).
154
154
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
@@ -162,9 +162,9 @@ module FusionAuth
162
162
  #
163
163
  # Check to see if the user must obtain a Trust Request Id in order to complete a change password request.
164
164
  # When a user has enabled Two-Factor authentication, before you are allowed to use the Change Password API to change
165
- # your password, you must obtain a Truest Request Id by completing a Two-Factor Step-Up authentication.
165
+ # your password, you must obtain a Trust Request Id by completing a Two-Factor Step-Up authentication.
166
166
  #
167
- # An HTTP status code of 412 indicates that a Trust Token is required to make a POST request to this API.
167
+ # An HTTP status code of 400 with a general error code of [TrustTokenRequired] indicates that a Trust Token is required to make a POST request to this API.
168
168
  #
169
169
  # @param login_id [string] The loginId of the User that you intend to change the password for.
170
170
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
@@ -1511,6 +1511,21 @@ module FusionAuth
1511
1511
  .go()
1512
1512
  end
1513
1513
 
1514
+ #
1515
+ # Sends a ping to FusionAuth indicating that the user was automatically logged into an application. When using
1516
+ # FusionAuth's SSO or your own, you should call this if the user is already logged in centrally, but accesses an
1517
+ # application where they no longer have a session. This helps correctly track login counts, times and helps with
1518
+ # reporting.
1519
+ #
1520
+ # @param request [OpenStruct, Hash] The login request that contains the user credentials used to log them in.
1521
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
1522
+ def login_ping_with_request(request)
1523
+ start.uri('/api/login')
1524
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
1525
+ .put()
1526
+ .go()
1527
+ end
1528
+
1514
1529
  #
1515
1530
  # The Logout API is intended to be used to remove the refresh token and access token cookies if they exist on the
1516
1531
  # client and revoke the refresh token stored. This API does nothing if the request does not contain an access
@@ -2076,7 +2091,7 @@ module FusionAuth
2076
2091
  end
2077
2092
 
2078
2093
  #
2079
- # Retrieves all of the actions for the user with the given Id. This will return all time based actions that are active,
2094
+ # Retrieves all the actions for the user with the given Id. This will return all time based actions that are active,
2080
2095
  # and inactive as well as non-time based actions.
2081
2096
  #
2082
2097
  # @param user_id [string] The Id of the user to fetch the actions for.
@@ -2089,7 +2104,7 @@ module FusionAuth
2089
2104
  end
2090
2105
 
2091
2106
  #
2092
- # Retrieves all of the actions for the user with the given Id that are currently preventing the User from logging in.
2107
+ # Retrieves all the actions for the user with the given Id that are currently preventing the User from logging in.
2093
2108
  #
2094
2109
  # @param user_id [string] The Id of the user to fetch the actions for.
2095
2110
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
@@ -2102,7 +2117,7 @@ module FusionAuth
2102
2117
  end
2103
2118
 
2104
2119
  #
2105
- # Retrieves all of the actions for the user with the given Id that are currently active.
2120
+ # Retrieves all the actions for the user with the given Id that are currently active.
2106
2121
  # An active action means one that is time based and has not been canceled, and has not ended.
2107
2122
  #
2108
2123
  # @param user_id [string] The Id of the user to fetch the actions for.
@@ -2128,7 +2143,7 @@ module FusionAuth
2128
2143
  end
2129
2144
 
2130
2145
  #
2131
- # Retrieves all of the applications.
2146
+ # Retrieves all the applications.
2132
2147
  #
2133
2148
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
2134
2149
  def retrieve_applications()
@@ -2162,7 +2177,7 @@ module FusionAuth
2162
2177
  end
2163
2178
 
2164
2179
  #
2165
- # Retrieves all of the connectors.
2180
+ # Retrieves all the connectors.
2166
2181
  #
2167
2182
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
2168
2183
  def retrieve_connectors()
@@ -2184,7 +2199,7 @@ module FusionAuth
2184
2199
  end
2185
2200
 
2186
2201
  #
2187
- # Retrieves all of the consent.
2202
+ # Retrieves all the consent.
2188
2203
  #
2189
2204
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
2190
2205
  def retrieve_consents()
@@ -2237,7 +2252,7 @@ module FusionAuth
2237
2252
  end
2238
2253
 
2239
2254
  #
2240
- # Retrieves all of the email templates.
2255
+ # Retrieves all the email templates.
2241
2256
  #
2242
2257
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
2243
2258
  def retrieve_email_templates()
@@ -2288,7 +2303,7 @@ module FusionAuth
2288
2303
  end
2289
2304
 
2290
2305
  #
2291
- # Retrieves all of the Entity Types.
2306
+ # Retrieves all the Entity Types.
2292
2307
  #
2293
2308
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
2294
2309
  def retrieve_entity_types()
@@ -2310,7 +2325,7 @@ module FusionAuth
2310
2325
  end
2311
2326
 
2312
2327
  #
2313
- # Retrieves all of the families that a user belongs to.
2328
+ # Retrieves all the families that a user belongs to.
2314
2329
  #
2315
2330
  # @param user_id [string] The User's id
2316
2331
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
@@ -2322,7 +2337,7 @@ module FusionAuth
2322
2337
  end
2323
2338
 
2324
2339
  #
2325
- # Retrieves all of the members of a family by the unique Family Id.
2340
+ # Retrieves all the members of a family by the unique Family Id.
2326
2341
  #
2327
2342
  # @param family_id [string] The unique Id of the Family.
2328
2343
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
@@ -2358,7 +2373,7 @@ module FusionAuth
2358
2373
  end
2359
2374
 
2360
2375
  #
2361
- # Retrieves all of the forms fields
2376
+ # Retrieves all the forms fields
2362
2377
  #
2363
2378
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
2364
2379
  def retrieve_form_fields()
@@ -2368,7 +2383,7 @@ module FusionAuth
2368
2383
  end
2369
2384
 
2370
2385
  #
2371
- # Retrieves all of the forms.
2386
+ # Retrieves all the forms.
2372
2387
  #
2373
2388
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
2374
2389
  def retrieve_forms()
@@ -2390,7 +2405,7 @@ module FusionAuth
2390
2405
  end
2391
2406
 
2392
2407
  #
2393
- # Retrieves all of the groups.
2408
+ # Retrieves all the groups.
2394
2409
  #
2395
2410
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
2396
2411
  def retrieve_groups()
@@ -2438,7 +2453,7 @@ module FusionAuth
2438
2453
  end
2439
2454
 
2440
2455
  #
2441
- # Retrieves all of the identity providers.
2456
+ # Retrieves all the identity providers.
2442
2457
  #
2443
2458
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
2444
2459
  def retrieve_identity_providers()
@@ -2448,7 +2463,7 @@ module FusionAuth
2448
2463
  end
2449
2464
 
2450
2465
  #
2451
- # Retrieves all of the actions for the user with the given Id that are currently inactive.
2466
+ # Retrieves all the actions for the user with the given Id that are currently inactive.
2452
2467
  # An inactive action means one that is time based and has been canceled or has expired, or is not time based.
2453
2468
  #
2454
2469
  # @param user_id [string] The Id of the user to fetch the actions for.
@@ -2462,7 +2477,7 @@ module FusionAuth
2462
2477
  end
2463
2478
 
2464
2479
  #
2465
- # Retrieves all of the applications that are currently inactive.
2480
+ # Retrieves all the applications that are currently inactive.
2466
2481
  #
2467
2482
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
2468
2483
  def retrieve_inactive_applications()
@@ -2473,7 +2488,7 @@ module FusionAuth
2473
2488
  end
2474
2489
 
2475
2490
  #
2476
- # Retrieves all of the user actions that are currently inactive.
2491
+ # Retrieves all the user actions that are currently inactive.
2477
2492
  #
2478
2493
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
2479
2494
  def retrieve_inactive_user_actions()
@@ -2550,7 +2565,7 @@ module FusionAuth
2550
2565
  end
2551
2566
 
2552
2567
  #
2553
- # Retrieves all of the keys.
2568
+ # Retrieves all the keys.
2554
2569
  #
2555
2570
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
2556
2571
  def retrieve_keys()
@@ -2572,7 +2587,7 @@ module FusionAuth
2572
2587
  end
2573
2588
 
2574
2589
  #
2575
- # Retrieves all of the lambdas.
2590
+ # Retrieves all the lambdas.
2576
2591
  #
2577
2592
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
2578
2593
  def retrieve_lambdas()
@@ -2582,7 +2597,7 @@ module FusionAuth
2582
2597
  end
2583
2598
 
2584
2599
  #
2585
- # Retrieves all of the lambdas for the provided type.
2600
+ # Retrieves all the lambdas for the provided type.
2586
2601
  #
2587
2602
  # @param type [OpenStruct, Hash] The type of the lambda to return.
2588
2603
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
@@ -2635,7 +2650,7 @@ module FusionAuth
2635
2650
  end
2636
2651
 
2637
2652
  #
2638
- # Retrieves all of the message templates.
2653
+ # Retrieves all the message templates.
2639
2654
  #
2640
2655
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
2641
2656
  def retrieve_message_templates()
@@ -2657,7 +2672,7 @@ module FusionAuth
2657
2672
  end
2658
2673
 
2659
2674
  #
2660
- # Retrieves all of the messengers.
2675
+ # Retrieves all the messengers.
2661
2676
  #
2662
2677
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
2663
2678
  def retrieve_messengers()
@@ -2734,7 +2749,7 @@ module FusionAuth
2734
2749
  end
2735
2750
 
2736
2751
  #
2737
- # Retrieves all of the children for the given parent email address.
2752
+ # Retrieves all the children for the given parent email address.
2738
2753
  #
2739
2754
  # @param parent_email [string] The email of the parent.
2740
2755
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
@@ -2780,13 +2795,13 @@ module FusionAuth
2780
2795
  end
2781
2796
 
2782
2797
  #
2783
- # 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..
2798
+ # 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.
2784
2799
  #
2785
- # @param user_id [string] The Id of the user.
2800
+ # @param token_id [string] The Id of the token.
2786
2801
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
2787
- def retrieve_refresh_token_by_id(user_id)
2802
+ def retrieve_refresh_token_by_id(token_id)
2788
2803
  start.uri('/api/jwt/refresh')
2789
- .url_segment(user_id)
2804
+ .url_segment(token_id)
2790
2805
  .get()
2791
2806
  .go()
2792
2807
  end
@@ -2868,7 +2883,7 @@ module FusionAuth
2868
2883
  end
2869
2884
 
2870
2885
  #
2871
- # Retrieves all of the tenants.
2886
+ # Retrieves all the tenants.
2872
2887
  #
2873
2888
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
2874
2889
  def retrieve_tenants()
@@ -2890,7 +2905,7 @@ module FusionAuth
2890
2905
  end
2891
2906
 
2892
2907
  #
2893
- # Retrieves all of the themes.
2908
+ # Retrieves all the themes.
2894
2909
  #
2895
2910
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
2896
2911
  def retrieve_themes()
@@ -2922,6 +2937,25 @@ module FusionAuth
2922
2937
  .go()
2923
2938
  end
2924
2939
 
2940
+ #
2941
+ # Retrieve a user's two-factor status.
2942
+ #
2943
+ # This can be used to see if a user will need to complete a two-factor challenge to complete a login,
2944
+ # and optionally identify the state of the two-factor trust across various applications.
2945
+ #
2946
+ # @param user_id [string] The user Id to retrieve the Two-Factor status.
2947
+ # @param application_id [string] The optional applicationId to verify.
2948
+ # @param two_factor_trust_id [string] The optional two-factor trust Id to verify.
2949
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
2950
+ def retrieve_two_factor_status(user_id, application_id, two_factor_trust_id)
2951
+ start.uri('/api/two-factor/status')
2952
+ .url_parameter('userId', user_id)
2953
+ .url_parameter('applicationId', application_id)
2954
+ .url_segment(two_factor_trust_id)
2955
+ .get()
2956
+ .go()
2957
+ end
2958
+
2925
2959
  #
2926
2960
  # Retrieves the user for the given Id.
2927
2961
  #
@@ -2971,7 +3005,7 @@ module FusionAuth
2971
3005
  end
2972
3006
 
2973
3007
  #
2974
- # Retrieves all of the user actions.
3008
+ # Retrieves all the user actions.
2975
3009
  #
2976
3010
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
2977
3011
  def retrieve_user_actions()
@@ -3043,7 +3077,7 @@ module FusionAuth
3043
3077
  end
3044
3078
 
3045
3079
  #
3046
- # Retrieves all of the comments for the user with the given Id.
3080
+ # Retrieves all the comments for the user with the given Id.
3047
3081
  #
3048
3082
  # @param user_id [string] The Id of the user.
3049
3083
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
@@ -3067,7 +3101,7 @@ module FusionAuth
3067
3101
  end
3068
3102
 
3069
3103
  #
3070
- # Retrieves all of the consents for a User.
3104
+ # Retrieves all the consents for a User.
3071
3105
  #
3072
3106
  # @param user_id [string] The User's Id
3073
3107
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
@@ -3416,6 +3450,18 @@ module FusionAuth
3416
3450
  .go()
3417
3451
  end
3418
3452
 
3453
+ #
3454
+ # Searches group members with the specified criteria and pagination.
3455
+ #
3456
+ # @param request [OpenStruct, Hash] The search criteria and pagination information.
3457
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
3458
+ def search_group_members(request)
3459
+ start.uri('/api/group/member/search')
3460
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
3461
+ .post()
3462
+ .go()
3463
+ end
3464
+
3419
3465
  #
3420
3466
  # Searches the IP Access Control Lists with the specified criteria and pagination.
3421
3467
  #
@@ -3812,6 +3858,18 @@ module FusionAuth
3812
3858
  .go()
3813
3859
  end
3814
3860
 
3861
+ #
3862
+ # Creates a member in a group.
3863
+ #
3864
+ # @param request [OpenStruct, Hash] The request object that contains all the information used to create the group member(s).
3865
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
3866
+ def update_group_members(request)
3867
+ start.uri('/api/group/member')
3868
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
3869
+ .put()
3870
+ .go()
3871
+ end
3872
+
3815
3873
  #
3816
3874
  # Updates the IP Access Control List with the given Id.
3817
3875
  #
@@ -4127,6 +4185,20 @@ module FusionAuth
4127
4185
  .go()
4128
4186
  end
4129
4187
 
4188
+ #
4189
+ # Administratively verify a user's email address. Use this method to bypass email verification for the user.
4190
+ #
4191
+ # The request body will contain the userId to be verified. An API key is required when sending the userId in the request body.
4192
+ #
4193
+ # @param request [OpenStruct, Hash] The request that contains the userId to verify.
4194
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
4195
+ def verify_email_address_by_user_id(request)
4196
+ start.uri('/api/user/verify-email')
4197
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
4198
+ .post()
4199
+ .go()
4200
+ end
4201
+
4130
4202
  #
4131
4203
  # Confirms an application registration. The Id given is usually from an email sent to the user.
4132
4204
  #
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.34.0
4
+ version: 1.38.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: 2022-02-22 00:00:00.000000000 Z
12
+ date: 2022-08-17 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.
@@ -28,6 +28,8 @@ files:
28
28
  - README.md
29
29
  - Rakefile
30
30
  - build.savant
31
+ - examples/create_user.rb
32
+ - examples/login.rb
31
33
  - fusionauth-ruby-client.iml
32
34
  - fusionauth_client.gemspec
33
35
  - lib/fusionauth/fusionauth_client.rb