fusionauth_client 1.19.0 → 1.20.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: d303bd307e78872200ef01bc1e844055b9ea1ae03d1b2d6511b3461d5c74982c
4
- data.tar.gz: ca014231534dc88b074bf0b346f6816dda024c2f616084e9597384582d85504b
3
+ metadata.gz: e815e4667224cb1fb5ae6df284a1b3a578143f84fb9ce6bc170eefaf1bc9b817
4
+ data.tar.gz: c795401c250613344f61cb50ced363afe2c7f23e92088b812787123dbe9a8c7a
5
5
  SHA512:
6
- metadata.gz: aef780bb6cf6fc5c2e28f7f85eccdb374994e46ad23ce2114d21c22b4b24efc44e807164edace5cd804ac8d3a72f53567e6eb268ed881480d563138361137227
7
- data.tar.gz: e4b5f5c4c42e8f9a957d504541f4484ef8edbe7f63566559e93a1695821406730e5b36ea844a2ba7351d7c179227b4b69cc051918c3c413097ff4ea313199623
6
+ metadata.gz: a7d776826e013d30fcda08077b548dbd1af76243011d43c5f29e371eac9e5e25c2416ac79c3cab41560671d9c2df1f42f3ec7e5facdd6695dba1693519bde83c
7
+ data.tar.gz: a6e727d09bb8fdfd4f176237ab3de1f590cec4259fb9d2eb099ae3781057063ccc47426c42fd65bc21af4d97d32672bd3c48b571c8cdccca8319ca89959763a3
@@ -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.19.0", licenses: ["ApacheV2_0"]) {
19
+ project(group: "io.fusionauth", name: "fusionauth-ruby-client", version: "1.20.0", licenses: ["ApacheV2_0"]) {
20
20
  workflow {
21
21
  standard()
22
22
  }
@@ -12,4 +12,4 @@
12
12
  <orderEntry type="library" scope="PROVIDED" name="minitest (v5.8.3, rbenv: 2.5.1) [gem]" level="application" />
13
13
  <orderEntry type="library" scope="PROVIDED" name="rake (v12.3.3, rbenv: 2.5.1) [gem]" level="application" />
14
14
  </component>
15
- </module>
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.19.0'
7
+ spec.version = '1.20.0'
8
8
  spec.authors = ['Brian Pontarelli', 'Daniel DeGroff']
9
9
  spec.email = %w(brian@fusionauth.io daniel@fusionauth.io)
10
10
 
@@ -940,8 +940,8 @@ module FusionAuth
940
940
  # @param encoded_jwt [string] The encoded JWT (access token).
941
941
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
942
942
  def generate_two_factor_secret_using_jwt(encoded_jwt)
943
- start.uri('/api/two-factor/secret')
944
- .authorization('JWT ' + encoded_jwt)
943
+ startAnonymous.uri('/api/two-factor/secret')
944
+ .authorization('Bearer ' + encoded_jwt)
945
945
  .get()
946
946
  .go()
947
947
  end
@@ -1012,6 +1012,23 @@ module FusionAuth
1012
1012
  .go()
1013
1013
  end
1014
1014
 
1015
+ #
1016
+ # Inspect an access token issued by FusionAuth.
1017
+ #
1018
+ # @param client_id [string] The unique client identifier. The client Id is the Id of the FusionAuth Application for which this token was generated.
1019
+ # @param token [string] The access token returned by this OAuth provider as the result of a successful authentication.
1020
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
1021
+ def introspect_access_token(client_id, token)
1022
+ body = {
1023
+ "client_id" => client_id,
1024
+ "token" => token
1025
+ }
1026
+ startAnonymous.uri('/oauth2/introspect')
1027
+ .body_handler(FusionAuth::FormDataBodyHandler.new(body))
1028
+ .post()
1029
+ .go()
1030
+ end
1031
+
1015
1032
  #
1016
1033
  # Issue a new access token (JWT) for the requested Application after ensuring the provided JWT is valid. A valid
1017
1034
  # access token is properly signed and not expired.
@@ -1026,8 +1043,8 @@ module FusionAuth
1026
1043
  # tokens enabled in order to receive a refresh token in the response.</p>
1027
1044
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
1028
1045
  def issue_jwt(application_id, encoded_jwt, refresh_token)
1029
- start.uri('/api/jwt/issue')
1030
- .authorization('JWT ' + encoded_jwt)
1046
+ startAnonymous.uri('/api/jwt/issue')
1047
+ .authorization('Bearer ' + encoded_jwt)
1031
1048
  .url_parameter('applicationId', application_id)
1032
1049
  .url_parameter('refreshToken', refresh_token)
1033
1050
  .get()
@@ -2327,6 +2344,18 @@ module FusionAuth
2327
2344
  .go()
2328
2345
  end
2329
2346
 
2347
+ #
2348
+ # Call the UserInfo endpoint to retrieve User Claims from the access token issued by FusionAuth.
2349
+ #
2350
+ # @param encoded_jwt [string] The encoded JWT (access token).
2351
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
2352
+ def retrieve_user_info_from_access_token(encoded_jwt)
2353
+ startAnonymous.uri('/oauth2/userinfo')
2354
+ .authorization('Bearer ' + encoded_jwt)
2355
+ .get()
2356
+ .go()
2357
+ end
2358
+
2330
2359
  #
2331
2360
  # Retrieves the login report between the two instants for a particular user by Id. If you specify an application id, it will only return the
2332
2361
  # login counts for that application.
@@ -2388,7 +2417,7 @@ module FusionAuth
2388
2417
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
2389
2418
  def retrieve_user_using_jwt(encoded_jwt)
2390
2419
  startAnonymous.uri('/api/user')
2391
- .authorization('JWT ' + encoded_jwt)
2420
+ .authorization('Bearer ' + encoded_jwt)
2392
2421
  .get()
2393
2422
  .go()
2394
2423
  end
@@ -2951,7 +2980,7 @@ module FusionAuth
2951
2980
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
2952
2981
  def validate_jwt(encoded_jwt)
2953
2982
  startAnonymous.uri('/api/jwt/validate')
2954
- .authorization('JWT ' + encoded_jwt)
2983
+ .authorization('Bearer ' + encoded_jwt)
2955
2984
  .get()
2956
2985
  .go()
2957
2986
  end
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fusionauth_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.19.0
4
+ version: 1.20.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Pontarelli
8
8
  - Daniel DeGroff
9
- autorequire:
9
+ autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2020-09-04 00:00:00.000000000 Z
12
+ date: 2020-10-26 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.
@@ -36,7 +36,7 @@ licenses:
36
36
  - Apache-2.0
37
37
  metadata:
38
38
  allowed_push_host: https://rubygems.org
39
- post_install_message:
39
+ post_install_message:
40
40
  rdoc_options: []
41
41
  require_paths:
42
42
  - lib
@@ -52,7 +52,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
52
52
  version: '0'
53
53
  requirements: []
54
54
  rubygems_version: 3.1.4
55
- signing_key:
55
+ signing_key:
56
56
  specification_version: 4
57
57
  summary: The Ruby client library for FusionAuth
58
58
  test_files: []