fusionauth_client 1.20.0 → 1.22.2

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: e815e4667224cb1fb5ae6df284a1b3a578143f84fb9ce6bc170eefaf1bc9b817
4
- data.tar.gz: c795401c250613344f61cb50ced363afe2c7f23e92088b812787123dbe9a8c7a
3
+ metadata.gz: 7504436c70c65f924355c8a3e2e1542963fb627e4ffdef8a0c5634c08e46177c
4
+ data.tar.gz: a784efb9310fd1a8dc1ccf8a4da4ae7af2b116cc0b95690f5cef7b579861f451
5
5
  SHA512:
6
- metadata.gz: a7d776826e013d30fcda08077b548dbd1af76243011d43c5f29e371eac9e5e25c2416ac79c3cab41560671d9c2df1f42f3ec7e5facdd6695dba1693519bde83c
7
- data.tar.gz: a6e727d09bb8fdfd4f176237ab3de1f590cec4259fb9d2eb099ae3781057063ccc47426c42fd65bc21af4d97d32672bd3c48b571c8cdccca8319ca89959763a3
6
+ metadata.gz: 0b21b82941c8fa43bad019f36bfb6fde41a4fd078cfb7d4cf8a409cf152d7b1ce654633a9e525d6d469e843c89df49404f361d0cd250f7c233c2e764aabf16ee
7
+ data.tar.gz: b30a03fcd01c5e047b4ada98a7c3307f43255b8d2c851f8fc9a391678dc74ea396851786be5cdf4865d6f0efb914de82dc23ddec0bbca9de546554236235c66e
data/.gitignore CHANGED
@@ -8,4 +8,5 @@
8
8
  /spec/reports/
9
9
  /tmp/
10
10
  .rakeTasks
11
- /build
11
+ /build
12
+ **/.DS_Store
@@ -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.20.0", licenses: ["ApacheV2_0"]) {
19
+ project(group: "io.fusionauth", name: "fusionauth-ruby-client", version: "1.22.2", licenses: ["ApacheV2_0"]) {
20
20
  workflow {
21
21
  standard()
22
22
  }
@@ -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.20.0'
7
+ spec.version = '1.22.2'
8
8
  spec.authors = ['Brian Pontarelli', 'Daniel DeGroff']
9
9
  spec.email = %w(brian@fusionauth.io daniel@fusionauth.io)
10
10
 
@@ -652,6 +652,20 @@ module FusionAuth
652
652
  .go()
653
653
  end
654
654
 
655
+ #
656
+ # Deletes the tenant for the given Id asynchronously.
657
+ # This method is helpful if you do not want to wait for the delete operation to complete.
658
+ #
659
+ # @param tenant_id [string] The Id of the tenant to delete.
660
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
661
+ def delete_tenant_async(tenant_id)
662
+ start.uri('/api/tenant')
663
+ .url_segment(tenant_id)
664
+ .url_parameter('async', true)
665
+ .delete()
666
+ .go()
667
+ end
668
+
655
669
  #
656
670
  # Deletes the theme for the given Id.
657
671
  #
@@ -779,7 +793,7 @@ module FusionAuth
779
793
 
780
794
  #
781
795
  # Exchanges an OAuth authorization code for an access token.
782
- # If you will be using the Authorization Code grant, you will make a request to the Token endpoint to exchange the authorization code returned from the Authorize endpoint for an access token.
796
+ # Makes a request to the Token endpoint to exchange the authorization code returned from the Authorize endpoint for an access token.
783
797
  #
784
798
  # @param code [string] The authorization code returned on the /oauth2/authorize response.
785
799
  # @param client_id [string] The unique client identifier. The client Id is the Id of the FusionAuth Application in which you you are attempting to authenticate.
@@ -800,6 +814,31 @@ module FusionAuth
800
814
  .go()
801
815
  end
802
816
 
817
+ #
818
+ # Exchanges an OAuth authorization code and code_verifier for an access token.
819
+ # Makes a request to the Token endpoint to exchange the authorization code returned from the Authorize endpoint and a code_verifier for an access token.
820
+ #
821
+ # @param code [string] The authorization code returned on the /oauth2/authorize response.
822
+ # @param client_id [string] (Optional) The unique client identifier. The client Id is the Id of the FusionAuth Application in which you you are attempting to authenticate. This parameter is optional when the Authorization header is provided.
823
+ # @param client_secret [string] (Optional) The client secret. This value may optionally be provided in the request body instead of the Authorization header.
824
+ # @param redirect_uri [string] The URI to redirect to upon a successful request.
825
+ # @param code_verifier [string] The random string generated previously. Will be compared with the code_challenge sent previously, which allows the OAuth provider to authenticate your app.
826
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
827
+ def exchange_o_auth_code_for_access_token_using_pkce(code, client_id, client_secret, redirect_uri, code_verifier)
828
+ body = {
829
+ "code" => code,
830
+ "client_id" => client_id,
831
+ "client_secret" => client_secret,
832
+ "grant_type" => "authorization_code",
833
+ "redirect_uri" => redirect_uri,
834
+ "code_verifier" => code_verifier
835
+ }
836
+ startAnonymous.uri('/oauth2/token')
837
+ .body_handler(FusionAuth::FormDataBodyHandler.new(body))
838
+ .post()
839
+ .go()
840
+ end
841
+
803
842
  #
804
843
  # Exchange a Refresh Token for an Access Token.
805
844
  # If you will be using the Refresh Token Grant, you will make a request to the Token endpoint to exchange the user’s refresh token for an access token.
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.20.0
4
+ version: 1.22.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: 2020-10-26 00:00:00.000000000 Z
12
+ date: 2020-12-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.