smile-identity-core 2.1.1 → 2.1.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: cfb7b18b264e3489d0e51f3f9cae6c8557ef535fbf3b348e6b843695c748d76f
4
- data.tar.gz: 0f1c92749d1a139f02bd8216136eab00842d718425e45a5ffbe7174a69d1cf8a
3
+ metadata.gz: 49f65644b6f79351210a6712dda9f2cd2ad4ac79018b07e7aaa7d1291fce0e64
4
+ data.tar.gz: ce5e5242fac1cc29376d81f7ed10862d8b97011d09dfe49f4fb32079c87d709b
5
5
  SHA512:
6
- metadata.gz: 3d66bd0c015e777468b738e58116219ae48dfa99a98ef2b8a8d53abe2c7d6cc07804e23316aeb39aa0affc1c8be03307d4378c088831e37bb5084910d180713c
7
- data.tar.gz: 5eec195935a7fbd2eaf0f85930f8ebbe5578a6be874ff7288b7cc43c120cae9e2666f40eaf043245824657bee3988a4deda19fc93fd59f35def7bb60430454ab
6
+ metadata.gz: d00a98b441dcf5b90a23256d6984320dce1045de4a2a7fc17d6cf4895c0b7f35d4f96ca4f9a027a6787906839407dcf1b029c93f80693069ecea6530baf0e146
7
+ data.tar.gz: ad0d04857af60204f7f603debd7391aadab187311c46691f1d43eae213c043c5fc76dfd79093ef56f23580f48a1f345a5b22a3a5fd592c8ae6a0a626598207f2
@@ -11,8 +11,10 @@ jobs:
11
11
  runs-on: ubuntu-latest
12
12
  steps:
13
13
  - uses: actions/checkout@v3
14
+ with:
15
+ set-safe-directory: false
14
16
  - name: Release Gem
15
- uses: cadwallion/publish-rubygems-action@master
17
+ uses: powerhome/publish-rubygems-action@git-safe-directory
16
18
  env:
17
19
  RUBYGEMS_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }}
18
20
  GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
data/CHANGELOG.md CHANGED
@@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [2.1.2] - 2023-03-09
10
+ ### Changed
11
+ - Fix `get_web_token` by ensuring signature merges to request_params
12
+
9
13
  ## [2.1.1] - 2022-12-13
10
14
  ### Added
11
15
  - Adds UPDATE_PHOTO and COMPARE_USER_INFO to JobType
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- smile-identity-core (2.1.1)
4
+ smile-identity-core (2.1.2)
5
5
  rubyzip (~> 1.2, >= 1.2.3)
6
6
  typhoeus (~> 1.0, >= 1.0.1)
7
7
 
@@ -0,0 +1,26 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'smile-identity-core'
4
+ require 'random/formatter'
5
+
6
+ # See https://docs.smileidentity.com/server-to-server/ruby/products/biometric-kyc for
7
+ # how to setup and retrieve configuation values for the WebApi class.
8
+
9
+ # Initialize
10
+ partner_id = '<Put your partner ID here>'; # login to the Smile Identity portal to view your partner id
11
+ default_callback = '<Put your default callback url here>'
12
+ api_key = '<Put your API key here>'; # copy your API key from the Smile Identity portal
13
+ sid_server = '<0 | 1>'; # Use '0' for the sandbox server, use '1' for production server
14
+
15
+ connection = SmileIdentityCore::WebApi.new(partner_id, default_callback, api_key, sid_server)
16
+
17
+ # Set up request payload
18
+ request_params = {
19
+ user_id: '<your unique user id>',
20
+ job_id: '<your unique job id>',
21
+ product: '<smile identity product type>',
22
+ callback_url: '<your callback url>'
23
+ }
24
+
25
+ # Get web token
26
+ connection.get_web_token(request_params)
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SmileIdentityCore
4
- VERSION = '2.1.1'
4
+ VERSION = '2.1.2'
5
5
  SOURCE_SDK = 'Ruby'
6
6
  end
@@ -129,9 +129,9 @@ module SmileIdentityCore
129
129
  private
130
130
 
131
131
  def request_web_token(request_params)
132
- request_params
132
+ request_params = request_params
133
133
  .merge(SmileIdentityCore::Signature.new(@partner_id, @api_key).generate_signature(Time.now.to_s))
134
- .merge!(
134
+ .merge(
135
135
  { partner_id: @partner_id,
136
136
  source_sdk: SmileIdentityCore::SOURCE_SDK,
137
137
  source_sdk_version: SmileIdentityCore::VERSION }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: smile-identity-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.1
4
+ version: 2.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Smile Identity
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-12-13 00:00:00.000000000 Z
11
+ date: 2023-03-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -177,6 +177,7 @@ files:
177
177
  - examples/example-project/README.md
178
178
  - examples/example-project/sample.env
179
179
  - examples/example-project/smart_bank.rb
180
+ - examples/get_web_token.rb
180
181
  - examples/smart_selfie_authentication.rb
181
182
  - lib/smile-identity-core.rb
182
183
  - lib/smile-identity-core/business_verification.rb
@@ -213,7 +214,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
213
214
  - !ruby/object:Gem::Version
214
215
  version: '0'
215
216
  requirements: []
216
- rubygems_version: 3.3.26
217
+ rubygems_version: 3.4.6
217
218
  signing_key:
218
219
  specification_version: 4
219
220
  summary: The Smile Identity Web API allows the user to access\ most of the features