fusionauth_client 1.20.1 → 1.21.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: 5fe088762f00614e8062a4e5a74260aaca9d468f34667c69cdff66dc86680089
4
- data.tar.gz: f8a4ad5c004e7bf5e6c214bab8af0664e0f64bc25f17b1e4259e3f789b6a0e0f
3
+ metadata.gz: a2112fbc16e044c2716b50a04c2a720acc7616e99e0119bc494c721947282504
4
+ data.tar.gz: 902dcf9aa23e9ea20ec66636d9cdb30d210adc6735cc56e60058c6c8eb643235
5
5
  SHA512:
6
- metadata.gz: dcc18aed9b7023fcf87dcffcda1a1c37f2a741e26fd48838f092fa9b080d9a51f282e4b89e6da8563746417e4ac112505ab2a0bc3540a4242fd9a9cc3b2e7f3e
7
- data.tar.gz: 6e2ea05d391a2a9e048151e90372c51b72ac0e8f7aebd7e62795988632d5cb4d26db1ac2b73c858aaf9444112f1fbe1b7d8b7f13f077d894e39113666167f02f
6
+ metadata.gz: 3c754dbde8485f89dc21b9b746b8ca4880ea8135612af8dcf056798ff92c0d98267b981d78fe1643574348cd4e4b8892df6b0807ff34581fcbfb89e403c266e1
7
+ data.tar.gz: 240debc7317d5c870636dcccf5aea0380b98dfe95ec10db183992658b8eb140970ac8c5084366ff013b7fcf09412d69b1e9fb2a5d9e3143935e06559004e5a9b
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.1", licenses: ["ApacheV2_0"]) {
19
+ project(group: "io.fusionauth", name: "fusionauth-ruby-client", version: "1.21.0", 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.1'
7
+ spec.version = '1.21.0'
8
8
  spec.authors = ['Brian Pontarelli', 'Daniel DeGroff']
9
9
  spec.email = %w(brian@fusionauth.io daniel@fusionauth.io)
10
10
 
@@ -779,7 +779,7 @@ module FusionAuth
779
779
 
780
780
  #
781
781
  # 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.
782
+ # Makes a request to the Token endpoint to exchange the authorization code returned from the Authorize endpoint for an access token.
783
783
  #
784
784
  # @param code [string] The authorization code returned on the /oauth2/authorize response.
785
785
  # @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 +800,31 @@ module FusionAuth
800
800
  .go()
801
801
  end
802
802
 
803
+ #
804
+ # Exchanges an OAuth authorization code and code_verifier for an access token.
805
+ # 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.
806
+ #
807
+ # @param code [string] The authorization code returned on the /oauth2/authorize response.
808
+ # @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.
809
+ # @param client_secret [string] (Optional) The client secret. This value may optionally be provided in the request body instead of the Authorization header.
810
+ # @param redirect_uri [string] The URI to redirect to upon a successful request.
811
+ # @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.
812
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
813
+ def exchange_o_auth_code_for_access_token_using_pkce(code, client_id, client_secret, redirect_uri, code_verifier)
814
+ body = {
815
+ "code" => code,
816
+ "client_id" => client_id,
817
+ "client_secret" => client_secret,
818
+ "grant_type" => "authorization_code",
819
+ "redirect_uri" => redirect_uri,
820
+ "code_verifier" => code_verifier
821
+ }
822
+ startAnonymous.uri('/oauth2/token')
823
+ .body_handler(FusionAuth::FormDataBodyHandler.new(body))
824
+ .post()
825
+ .go()
826
+ end
827
+
803
828
  #
804
829
  # Exchange a Refresh Token for an Access Token.
805
830
  # 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.1
4
+ version: 1.21.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-10-30 00:00:00.000000000 Z
12
+ date: 2020-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.