yoti 1.2.0 → 1.2.1

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
  SHA1:
3
- metadata.gz: db62b520742b6807cac9c0813675327f9dec1bf9
4
- data.tar.gz: fb2006107a34a2b9eed606ddc63ed61062ec8d96
3
+ metadata.gz: d5dc8fd313619013f57321a1985b0d2607f3bbc5
4
+ data.tar.gz: 3e98fe0494e17a488e856d1bfc2b93e0c3d607a1
5
5
  SHA512:
6
- metadata.gz: af3eebba165eaf25a7ab88a6a07a32de685a2f8ed522a3808519287955100127ef08dbc840856c849c1e25bbf3443a6aad64aa008edc4b29b21230dab5c1ecc2
7
- data.tar.gz: ba85c6be0f0978ebcb0209835fd0a4564cf9458b54f88173242705df7a3278b3c4c99bb37b858fb306edc49b998af9c89e809535d98c24cab0eabb8ab6306309
6
+ metadata.gz: 133fc1ba66c1efd09208b923e3bda7c84976bd80c14ce0c5e355ed054c642cf73283f748095dfbde5c01e109e1510f980fece42220db44fcb9cd7ae2d4c92007
7
+ data.tar.gz: 843e8284b64707b094392bc88ddb3ad67548ef86df2837e32990e2d0bb8e12c79bc271624bb9c84d9f0ff879b0602f6af49629436b1975b92414139484dd6ebe
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
4
4
  The format is based on [Keep a Changelog](http://keepachangelog.com/)
5
5
  and this project adheres to [Semantic Versioning](http://semver.org/).
6
6
 
7
+ ## 1.2.1 - 2018-03-06
8
+ ### Added
9
+ - `user_profile.age_verified` helper returns a boolean value of the age validation
10
+
7
11
  ## 1.2.0 - 2018-02-28
8
12
  ### Added
9
13
  - AML (Anti Money Laundering) check service
data/README.md CHANGED
@@ -191,7 +191,7 @@ Yoti will provide a boolean result on the following checks:
191
191
  * Fraud list - Verify against US Social Security Administration Fraud (SSN Fraud) list
192
192
  * Watch list - Verify against watch lists from the Office of Foreign Assets Control
193
193
 
194
- To use this functionality you must ensure your application is assigned to your Organisation in the Yoti Dashboard - please see here for further information.
194
+ To use this functionality you must ensure your application is assigned to your organisation in the Yoti Dashboard - please see here for further information.
195
195
 
196
196
  For the AML check you will need to provide the following:
197
197
 
@@ -235,7 +235,7 @@ The examples also use the `YOTI_APPLICATION_ID` environment variable to display
235
235
 
236
236
  ### Ruby on Rails
237
237
 
238
- * rename the [.env.default](examples/rails/.env.default) file to `.env` and fill in the required configuration values
238
+ * rename the [.env.example](examples/rails/.env.example) file to `.env` and fill in the required configuration values
239
239
  * install the dependencies with `bundle install`
240
240
  * start the server `rails server`
241
241
 
@@ -243,7 +243,7 @@ Visiting the `http://your-local-url.domain` should show a Yoti Connect button
243
243
 
244
244
  ### Sinatra
245
245
 
246
- * rename the [.env.default](examples/sinatra/.env.default) file to `.env` and fill in the required configuration values
246
+ * rename the [.env.example](examples/sinatra/.env.example) file to `.env` and fill in the required configuration values
247
247
  * install the dependencies with `bundle install`
248
248
  * start the server `ruby ./app.rb`
249
249
 
@@ -251,7 +251,7 @@ Visiting the `http://your-local-url.domain` should show a Yoti Connect button
251
251
 
252
252
  ### AML Check
253
253
 
254
- * rename the [.env.default](examples/aml_check/.env.default) file to `.env` and fill in the required configuration values
254
+ * rename the [.env.example](examples/aml_check/.env.example) file to `.env` and fill in the required configuration values
255
255
  * install the dependencies with `bundle install`
256
256
  * run the script with `ruby ./app.rb`
257
257
 
@@ -272,6 +272,7 @@ Visiting the `http://your-local-url.domain` should show a Yoti Connect button
272
272
  * [X] Gender `gender`
273
273
  * [X] Nationality `nationality`
274
274
  * [X] Base64 Selfie URI `base64_selfie_uri`
275
+ * [X] Age verified `age_verified`
275
276
 
276
277
  ## Support
277
278
 
@@ -15,6 +15,9 @@ module Yoti
15
15
  # @return [String] the selfie in base64 format
16
16
  attr_reader :base64_selfie_uri
17
17
 
18
+ # @return [Boolean] the age under/over attribute
19
+ attr_reader :age_verified
20
+
18
21
  # @param receipt [Hash] the receipt from the API request
19
22
  # @param decrypted_profile [Object] Protobuf AttributeList decrypted object containing the profile attributes
20
23
  def initialize(receipt, decrypted_profile = nil)
@@ -28,6 +31,11 @@ module Yoti
28
31
  if field.name == 'selfie'
29
32
  @base64_selfie_uri = Yoti::Protobuf.image_uri_based_on_content_type(field.value, field.content_type)
30
33
  end
34
+
35
+ # check if the key matches the format age_[over|under]:[1-999]
36
+ if /age_(over|under):[1-9][0-9]?[0-9]?/.match?(field.name)
37
+ @age_verified = field.value == 'true'
38
+ end
31
39
  end
32
40
  end
33
41
 
@@ -1,4 +1,4 @@
1
1
  module Yoti
2
2
  # @return [String] the gem's current version
3
- VERSION = '1.2.0'.freeze
3
+ VERSION = '1.2.1'.freeze
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yoti
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sebastian Zaremba
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-02-27 00:00:00.000000000 Z
11
+ date: 2018-03-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: protobuf