smile-identity-core 2.1.0 → 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: 0256a5d5a35915153e433d6bef6c697a4e5670ed25014b21c184253f5b8cea31
4
- data.tar.gz: 311bcb8052308ba0d543fa7d23f557b3e49555c31436b1cfe22833bf96d09c39
3
+ metadata.gz: 49f65644b6f79351210a6712dda9f2cd2ad4ac79018b07e7aaa7d1291fce0e64
4
+ data.tar.gz: ce5e5242fac1cc29376d81f7ed10862d8b97011d09dfe49f4fb32079c87d709b
5
5
  SHA512:
6
- metadata.gz: 5892d83748e2c5a320e99dcfa639de14a0a701f3fe39192173600f264c7b0d466873b6752728b57e5cf83d06f1ab1ce3535cd511d6be9d1c148e18a50b7e75ca
7
- data.tar.gz: 4876f4872cddb222bbf354dc050902d4c92d36c73a88f6b9ee40eadc41996aae72f7a5b844b269366dbbb514f586fbafbf28226f96efc9249451cf74567a670c
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,16 @@ 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
+
13
+ ## [2.1.1] - 2022-12-13
14
+ ### Added
15
+ - Adds UPDATE_PHOTO and COMPARE_USER_INFO to JobType
16
+ ### Changed
17
+ - Fix wrong constant values for JobType SMART_SELFIE_AUTHENTICATION and SMART_SELFIE_REGISTRATION
18
+
9
19
  # [2.1.0] - 2022-10-28
10
20
  ## Changed
11
21
  - Moved Business verification to IDApi
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- smile-identity-core (2.1.0)
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)
@@ -2,12 +2,25 @@
2
2
 
3
3
  module SmileIdentityCore
4
4
  module JobType
5
+ # Compares a selfie to a selfie on file.
5
6
  BIOMETRIC_KYC = 1
6
- SMART_SELFIE_REGISTRATION = 2
7
- SMART_SELFIE_AUTHENTICATION = 4
7
+ # Compares a selfie to a selfie on file.
8
+ SMART_SELFIE_AUTHENTICATION = 2
9
+ # Creates an enrollee, associates a selfie with a partner_id, user_id
10
+ SMART_SELFIE_REGISTRATION = 4
11
+ # Verifies identity information of a person with their personal
12
+ # information and ID number from one of our supported ID Types.
8
13
  BASIC_KYC = 5
14
+ # Queries Identity Information of user using ID_number.
9
15
  ENHANCED_KYC = 5
16
+ # Verifies user info retrieved from the ID issuing authority.
10
17
  DOCUMENT_VERIFICATION = 6
18
+ # Verifies authenticity of Document IDs, confirms it's linked to the user
19
+ # using facial biometrics.
11
20
  BUSINESS_VERIFICATION = 7
21
+ # Updates the photo on file for an enrolled user
22
+ UPDATE_PHOTO = 8
23
+ # Compares document verification to an id check
24
+ COMPARE_USER_INFO = 9
12
25
  end
13
26
  end
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SmileIdentityCore
4
- VERSION = '2.1.0'
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.0
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-11-28 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