devise-two-factor 2.0.0 → 2.0.1

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
  SHA1:
3
- metadata.gz: 139ae00abf04084452d11ccb85fba46e18ba36bb
4
- data.tar.gz: f8ebe13d8db9f67663306e854be967bd08d39460
3
+ metadata.gz: 080b8e13aabdb40b4f6252a9c80142d40b3f0a31
4
+ data.tar.gz: 3f6b9c9d1728b058717a3d18ce4c5735755ee3e3
5
5
  SHA512:
6
- metadata.gz: 4114ed8083d8daacbd15355132dc02c1bc33770bc8018a8a858e0888e1200eae1420be1eccc79af96b7ba5374af60c6a81562300b39b629ccdaba9f373c3b968
7
- data.tar.gz: 74bc2b4571a54206c9d3cf256eaa27bedf1e57f3c99ae1a7424beef6217afd8bfb4b22b5e6f5be3fcf8a3a7c894d820e46e019c1f14c47cd83e2f80a16089dd9
6
+ metadata.gz: 340098e34254cf9627b81ac3baf2618b459c4913708116d3afa9b4a02d1e9f35b92f27ab917e484ca6b255e993efde7fc4b54384a30b26761a11bee08c18b581
7
+ data.tar.gz: 1aef5ac6efd39452849e866f391b2e1f0e8307c7ee925ddcdeb2b152659bea30c052231b730a410e8829f37b0352cfabe6c49fefac476640f5fb10dc3164b5e9
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -9,3 +9,5 @@ class AddConsumedTimestepToUsers < ActiveRecord::Migration
9
9
  end
10
10
  end
11
11
  ```
12
+
13
+ All uses of the `valid_otp?` method should be switched to `validate_and_consume_otp!`
@@ -1,6 +1,7 @@
1
1
  shared_examples 'two_factor_authenticatable' do
2
2
  before :each do
3
3
  subject.otp_secret = subject.class.generate_otp_secret
4
+ subject.consumed_timestep = nil
4
5
  end
5
6
 
6
7
  describe 'required_fields' do
@@ -96,7 +97,8 @@ shared_examples 'two_factor_authenticatable' do
96
97
  end
97
98
 
98
99
  it 'should return uri with issuer option' do
99
- expect(subject.otp_provisioning_uri(account, issuer: issuer)).to match(%r{otpauth://totp/#{account}\?secret=\w{#{otp_secret_length}}&issuer=#{issuer}$})
100
+ expect(subject.otp_provisioning_uri(account, issuer: issuer)).to match(%r{otpauth://totp/#{account}\?.*secret=\w{#{otp_secret_length}}(&|$)})
101
+ expect(subject.otp_provisioning_uri(account, issuer: issuer)).to match(%r{otpauth://totp/#{account}\?.*issuer=#{issuer}(&|$)})
100
102
  end
101
103
  end
102
104
  end
@@ -1,3 +1,3 @@
1
1
  module DeviseTwoFactor
2
- VERSION = '2.0.0'.freeze
2
+ VERSION = '2.0.1'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: devise-two-factor
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shane Wilton
@@ -84,7 +84,7 @@ cert_chain:
84
84
  5C31v4YyRBnNCp0pN66nxYX2avEiQ8riTBP5mlkPPOhsIoYQHHe2Uj75aVpu0LZ3
85
85
  cdFzuO4GC1dV0Wv+dsDm+MyF7DT5E9pUPXpnMJuPvPrFpCb+wrFlszW9hGjXbQ==
86
86
  -----END CERTIFICATE-----
87
- date: 2015-09-16 00:00:00.000000000 Z
87
+ date: 2015-10-01 00:00:00.000000000 Z
88
88
  dependencies:
89
89
  - !ruby/object:Gem::Dependency
90
90
  name: railties
metadata.gz.sig CHANGED
Binary file