fusionauth_client 1.38.0 → 1.41.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: 4bf2c4810a2d7c274cda24502f66fdca37b188a74e8799417cc549d9c06e23a0
4
- data.tar.gz: b5aa5629f7120d7d4983de81bfddfc4127c0194a2061f1ed11366ab4820bf73d
3
+ metadata.gz: 1b267a3d6f8f3a00b68ac5727b783b756fef5fecffbe961fef3c3598255186a0
4
+ data.tar.gz: 69de43665a4b212dc29ec957203b6cc9ac38cb143f21b60ac68cd0b93d6336fc
5
5
  SHA512:
6
- metadata.gz: 36e2fb473ac870bd0f8b99a7c513c24bf60459d44e0b6dfc2eec1cad7cbb2ac3118e18df5b1df86ff2ffb151e4a55535e67e9c04a9ff5f587385ac145e2bffa9
7
- data.tar.gz: a6ba3e7aca263497406c858e66faedc98405334015bf0b8a9f5a36fb807564afe996fceeb3ad4381648345f5d09e81ad881b1c8730dd828e2ffef388c13d919d
6
+ metadata.gz: e47bfe9d82626e71a2a48e87d5c7add7e79244b780e404954629644f465c95afa9fe05356707393ff06f17120164cb96a6311c59bda27634f2d107eb1c5dce2a
7
+ data.tar.gz: '092c4e6154b7704114a28c76ab03873282333067e79fb322db51f90f92d2cfc8f8c3c174c0cabdfd31c23f288c6d64e06e810dd405db03109ca274009701b9ca'
data/Gemfile CHANGED
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2019, FusionAuth, All Rights Reserved
1
+ # Copyright (c) 2019-2022, FusionAuth, All Rights Reserved
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -15,8 +15,8 @@
15
15
  source 'https://rubygems.org'
16
16
  ruby '2.5.9'
17
17
 
18
- gem "rake", "12.3.3"
19
- gem "minitest", "5.8.3"
18
+ gem "rake", "12.3.3"
19
+ gem "minitest", "5.8.3"
20
20
 
21
21
  # Specify your gem's dependencies in fusionauth_client.gemspec
22
22
  gemspec
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- fusionauth_client (1.38.0)
4
+ fusionauth_client (1.41.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/build.savant CHANGED
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (c) 2018-2020, FusionAuth, All Rights Reserved
2
+ * Copyright (c) 2018-2022, FusionAuth, All Rights Reserved
3
3
  *
4
4
  * Licensed under the Apache License, Version 2.0 (the "License");
5
5
  * you may not use this file except in compliance with the License.
@@ -13,10 +13,9 @@
13
13
  * either express or implied. See the License for the specific
14
14
  * language governing permissions and limitations under the License.
15
15
  */
16
- savantVersion = "1.0.0"
17
16
 
18
17
  pubVersion = ""
19
- project(group: "io.fusionauth", name: "fusionauth-ruby-client", version: "1.38.0", licenses: ["ApacheV2_0"]) {
18
+ project(group: "io.fusionauth", name: "fusionauth-ruby-client", version: "1.41.0", licenses: ["ApacheV2_0"]) {
20
19
  workflow {
21
20
  fetch {
22
21
  cache()
@@ -40,8 +39,8 @@ project(group: "io.fusionauth", name: "fusionauth-ruby-client", version: "1.38.0
40
39
  }
41
40
 
42
41
  // Plugins
43
- file = loadPlugin(id: "org.savantbuild.plugin:file:1.0.2")
44
- release = loadPlugin(id: "org.savantbuild.plugin:release-git:${savantVersion}")
42
+ file = loadPlugin(id: "org.savantbuild.plugin:file:2.0.0-RC.4")
43
+ release = loadPlugin(id: "org.savantbuild.plugin:release-git:2.0.0-RC.4")
45
44
 
46
45
  target(name: "clean", description: "Cleans build directory") {
47
46
  file.prune(dir: 'pkg')
@@ -12,32 +12,4 @@
12
12
  <orderEntry type="library" scope="PROVIDED" name="minitest (v5.8.3, rbenv: 2.5.9) [gem]" level="application" />
13
13
  <orderEntry type="library" scope="PROVIDED" name="rake (v12.3.3, rbenv: 2.5.9) [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.37.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.37.0.gem into system gems" fullCommand="install" id="install" />
23
- <RakeTaskImpl id="install">
24
- <subtasks>
25
- <RakeTaskImpl description="Build and install fusionauth_client-1.37.0.gem into system gems without network access" fullCommand="install:local" id="local" />
26
- </subtasks>
27
- </RakeTaskImpl>
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]" />
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>
43
15
  </module>
@@ -1,17 +1,32 @@
1
1
  # coding: utf-8
2
+
3
+ # Copyright (c) 2022, FusionAuth, All Rights Reserved
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing,
12
+ # software distributed under the License is distributed on an
13
+ # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
14
+ # either express or implied. See the License for the specific
15
+ # language governing permissions and limitations under the License.
16
+
2
17
  lib = File.expand_path('../lib', __FILE__)
3
18
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
19
 
5
20
  Gem::Specification.new do |spec|
6
- spec.name = 'fusionauth_client'
7
- spec.version = '1.38.0'
8
- spec.authors = ['Brian Pontarelli', 'Daniel DeGroff']
9
- spec.email = %w(brian@fusionauth.io daniel@fusionauth.io)
21
+ spec.name = 'fusionauth_client'
22
+ spec.version = '1.41.0'
23
+ spec.authors = ['Brian Pontarelli', 'Daniel DeGroff']
24
+ spec.email = %w(brian@fusionauth.io daniel@fusionauth.io)
10
25
 
11
- spec.summary = %q{The Ruby client library for FusionAuth}
12
- spec.description = %q{This library contains the Ruby client library that helps you connect your application to FusionAuth.}
13
- spec.homepage = 'https://github.com/FusionAuth/fusionauth-ruby-client'
14
- spec.license = 'Apache-2.0'
26
+ spec.summary = %q{The Ruby client library for FusionAuth}
27
+ spec.description = %q{This library contains the Ruby client library that helps you connect your application to FusionAuth.}
28
+ spec.homepage = 'https://github.com/FusionAuth/fusionauth-ruby-client'
29
+ spec.license = 'Apache-2.0'
15
30
 
16
31
  # Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
17
32
  # to allow pushing to a single host or delete this section to allow pushing to any host.
@@ -21,11 +36,11 @@ Gem::Specification.new do |spec|
21
36
  raise 'RubyGems 2.0 or newer is required to protect against public gem pushes.'
22
37
  end
23
38
 
24
- spec.files = `git ls-files -z`.split("\x0").reject do |f|
39
+ spec.files = `git ls-files -z`.split("\x0").reject do |f|
25
40
  f.match(%r{^(test|spec|features)/})
26
41
  end
27
- spec.bindir = 'exe'
28
- spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
42
+ spec.bindir = 'exe'
43
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
29
44
  spec.require_paths = ['lib']
30
45
 
31
46
  # spec.add_development_dependency 'bundler', '~> 1.14'
@@ -175,6 +175,26 @@ module FusionAuth
175
175
  .go()
176
176
  end
177
177
 
178
+ #
179
+ # Make a Client Credentials grant request to obtain an access token.
180
+ #
181
+ # @param client_id [string] The client identifier. The client Id is the Id of the FusionAuth Entity in which you are attempting to authenticate.
182
+ # @param client_secret [string] The client secret used to authenticate this request.
183
+ # @param scope [string] (Optional) This parameter is used to indicate which target entity you are requesting access. To request access to an entity, use the format target-entity:&lt;target-entity-id&gt;:&lt;roles&gt;. Roles are an optional comma separated list.
184
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
185
+ def client_credentials_grant(client_id, client_secret, scope)
186
+ body = {
187
+ "client_id" => client_id,
188
+ "client_secret" => client_secret,
189
+ "grant_type" => "client_credentials",
190
+ "scope" => scope
191
+ }
192
+ startAnonymous.uri('/oauth2/token')
193
+ .body_handler(FusionAuth::FormDataBodyHandler.new(body))
194
+ .post()
195
+ .go()
196
+ end
197
+
178
198
  #
179
199
  # Adds a comment to the user's account.
180
200
  #
@@ -187,6 +207,42 @@ module FusionAuth
187
207
  .go()
188
208
  end
189
209
 
210
+ #
211
+ # Complete a WebAuthn authentication ceremony by validating the signature against the previously generated challenge without logging the user in
212
+ #
213
+ # @param request [OpenStruct, Hash] An object containing data necessary for completing the authentication ceremony
214
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
215
+ def complete_web_authn_assertion(request)
216
+ startAnonymous.uri('/api/webauthn/assert')
217
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
218
+ .post()
219
+ .go()
220
+ end
221
+
222
+ #
223
+ # Complete a WebAuthn authentication ceremony by validating the signature against the previously generated challenge and then login the user in
224
+ #
225
+ # @param request [OpenStruct, Hash] An object containing data necessary for completing the authentication ceremony
226
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
227
+ def complete_web_authn_login(request)
228
+ startAnonymous.uri('/api/webauthn/login')
229
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
230
+ .post()
231
+ .go()
232
+ end
233
+
234
+ #
235
+ # Complete a WebAuthn registration ceremony by validating the client request and saving the new credential
236
+ #
237
+ # @param request [OpenStruct, Hash] An object containing data necessary for completing the registration ceremony
238
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
239
+ def complete_web_authn_registration(request)
240
+ start.uri('/api/webauthn/register/complete')
241
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
242
+ .post()
243
+ .go()
244
+ end
245
+
190
246
  #
191
247
  # Creates an API key. You can optionally specify a unique Id for the key, if not provided one will be generated.
192
248
  # an API key can only be created with equal or lesser authority. An API key cannot create another API key unless it is granted
@@ -1110,6 +1166,18 @@ module FusionAuth
1110
1166
  .go()
1111
1167
  end
1112
1168
 
1169
+ #
1170
+ # Deletes the WebAuthn credential for the given Id.
1171
+ #
1172
+ # @param id [string] The Id of the WebAuthn credential to delete.
1173
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
1174
+ def delete_web_authn_credential(id)
1175
+ start.uri('/api/webauthn')
1176
+ .url_segment(id)
1177
+ .delete()
1178
+ .go()
1179
+ end
1180
+
1113
1181
  #
1114
1182
  # Deletes the webhook for the given Id.
1115
1183
  #
@@ -1438,6 +1506,18 @@ module FusionAuth
1438
1506
  .go()
1439
1507
  end
1440
1508
 
1509
+ #
1510
+ # Import a WebAuthn credential
1511
+ #
1512
+ # @param request [OpenStruct, Hash] An object containing data necessary for importing the credential
1513
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
1514
+ def import_web_authn_credential(request)
1515
+ start.uri('/api/webauthn/import')
1516
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
1517
+ .post()
1518
+ .go()
1519
+ end
1520
+
1441
1521
  #
1442
1522
  # Inspect an access token issued by FusionAuth.
1443
1523
  #
@@ -3230,6 +3310,30 @@ module FusionAuth
3230
3310
  .go()
3231
3311
  end
3232
3312
 
3313
+ #
3314
+ # Retrieves the WebAuthn credential for the given Id.
3315
+ #
3316
+ # @param id [string] The Id of the WebAuthn credential.
3317
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
3318
+ def retrieve_web_authn_credential(id)
3319
+ start.uri('/api/webauthn')
3320
+ .url_segment(id)
3321
+ .get()
3322
+ .go()
3323
+ end
3324
+
3325
+ #
3326
+ # Retrieves all WebAuthn credentials for the given user.
3327
+ #
3328
+ # @param user_id [string] The user's ID.
3329
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
3330
+ def retrieve_web_authn_credentials_for_user(user_id)
3331
+ start.uri('/api/webauthn')
3332
+ .url_parameter('userId', user_id)
3333
+ .get()
3334
+ .go()
3335
+ end
3336
+
3233
3337
  #
3234
3338
  # Retrieves the webhook for the given Id. If you pass in null for the id, this will return all the webhooks.
3235
3339
  #
@@ -3462,6 +3566,18 @@ module FusionAuth
3462
3566
  .go()
3463
3567
  end
3464
3568
 
3569
+ #
3570
+ # Searches groups with the specified criteria and pagination.
3571
+ #
3572
+ # @param request [OpenStruct, Hash] The search criteria and pagination information.
3573
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
3574
+ def search_groups(request)
3575
+ start.uri('/api/group/search')
3576
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
3577
+ .post()
3578
+ .go()
3579
+ end
3580
+
3465
3581
  #
3466
3582
  # Searches the IP Access Control Lists with the specified criteria and pagination.
3467
3583
  #
@@ -3672,6 +3788,30 @@ module FusionAuth
3672
3788
  .go()
3673
3789
  end
3674
3790
 
3791
+ #
3792
+ # Start a WebAuthn authentication ceremony by generating a new challenge for the user
3793
+ #
3794
+ # @param request [OpenStruct, Hash] An object containing data necessary for starting the authentication ceremony
3795
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
3796
+ def start_web_authn_login(request)
3797
+ start.uri('/api/webauthn/start')
3798
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
3799
+ .post()
3800
+ .go()
3801
+ end
3802
+
3803
+ #
3804
+ # Start a WebAuthn registration ceremony by generating a new challenge for the user
3805
+ #
3806
+ # @param request [OpenStruct, Hash] An object containing data necessary for starting the registration ceremony
3807
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
3808
+ def start_web_authn_registration(request)
3809
+ start.uri('/api/webauthn/register/start')
3810
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
3811
+ .post()
3812
+ .go()
3813
+ end
3814
+
3675
3815
  #
3676
3816
  # Complete login using a 2FA challenge
3677
3817
  #
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.38.0
4
+ version: 1.41.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-08-17 00:00:00.000000000 Z
12
+ date: 2022-11-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.