mobile_id 0.0.12 → 0.0.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b4176539bcbf710a8bf046e29e59ba85c61b3a74a9de1f5297fd054aa85fe7e6
4
- data.tar.gz: b8fccf6b553ab081cde92ea6824d64b7b2486848478969e87d3b34b9bc66f4e5
3
+ metadata.gz: 23c0f87295e5303fe359317d68393e1c9cb50f8ba1d51030edb01f6d9aed12c9
4
+ data.tar.gz: 02efb290beb29fcc719fe2b9a291fbd5590426f681835949630ae977e2167055
5
5
  SHA512:
6
- metadata.gz: 652482955ea58b873aa56772830b98f65225b9370d0deeedba926461fbec5e55b22f323c9c22ad6aa2f13819266025ae3b0c9c0b465729ef78367763e75f33f1
7
- data.tar.gz: c0e552ef60413221b435120ee59267f261707c34a3246c74448ec2c519b7df4968ff51452b6003cc826fc425f209f68eae37a47d3af51a0ad6c9e4fe6aa38c42
6
+ metadata.gz: f4223ca81fabe81ad3bacad29f1a7ea9026f797f619fb2bdd7f1ae4d1c15f931e61cb47e6dc6eb49f18b2b4293760b5fb324cddefb6c35b4b659ca2d05926e6f
7
+ data.tar.gz: f21c96ae471cfeff68341e19b3a83bed6ae4ba6b62262a8cb174e5f65f59bc4aeff114beb14638fad093a7ef59af0d983a42bdb29ac0bff061dae32fc95d85f2
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ Release 0.0.13
2
+ * More test friendly init
3
+ * More precise sert check
4
+
1
5
  Release 0.0.12
2
6
  * Supports session RUNNING state
3
7
  * Validate auth signature
data/README.md CHANGED
@@ -112,8 +112,8 @@ After checking out the repo, run `bundle` to install dependencies. For testing c
112
112
  ## Contributors
113
113
 
114
114
  * Priit Tark
115
- * Andri Möll for pointing out user signature issue
116
- * Juri Linkov for pointing out unpack method issue
115
+ * Andri Möll for pointing out user signature issue and cert date check
116
+ * Juri Linkov for pointing out unpack method issue and test friendly init
117
117
 
118
118
  ## Contributing
119
119
 
@@ -11,12 +11,12 @@ module MobileId
11
11
 
12
12
  attr_accessor :url, :uuid, :name, :doc, :hash, :user_cert, :live
13
13
 
14
- def initialize(live:, uuid: nil, name: nil)
14
+ def initialize(live:, uuid: nil, name: nil, doc: nil)
15
15
  self.url = live == true ? LIVE_URL : TEST_URL
16
16
  self.uuid = live == true ? uuid : TEST_UUID
17
17
  self.name = live == true ? name : TEST_NAME
18
18
  self.live = live
19
- init_doc(SecureRandom.hex(40))
19
+ init_doc(doc || SecureRandom.hex(40))
20
20
  end
21
21
 
22
22
  def init_doc(doc)
@@ -56,7 +56,7 @@ module MobileId
56
56
  end
57
57
 
58
58
  raise Error, 'User certificate is not valid [check_key]' unless cert.public_key.check_key
59
- raise Error, 'User certificate is expired' unless (cert.not_before..cert.not_after) === Time.now
59
+ raise Error, 'User certificate is expired' unless (cert.not_before...cert.not_after) === Time.now
60
60
 
61
61
  true
62
62
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mobile_id
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.12
4
+ version: 0.0.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Priit Tark
@@ -143,7 +143,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
143
143
  - !ruby/object:Gem::Version
144
144
  version: '0'
145
145
  requirements: []
146
- rubygems_version: 3.1.4
146
+ rubygems_version: 3.4.10
147
147
  signing_key:
148
148
  specification_version: 4
149
149
  summary: Estonia Mobile ID authentication