otp-jwt 0.2.6 → 0.2.7

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: bf8f83dacec78e2f6b12891bea71b4a45672ac967fa84fea749eb1acfe47c42c
4
- data.tar.gz: b8c3fb4e6b0f9824a42661ea2b650135bcb2281c2c5951a24ee0d8abe527ca01
3
+ metadata.gz: 16fc6a7023ef65ec63c539e7a43ad48b6a5a8a64b41269687c8c1db53e321c4b
4
+ data.tar.gz: 4c7e06c0dd6e1b29ea12de1f75c4f25310c8557965c7d8bbdeaf294c244683c2
5
5
  SHA512:
6
- metadata.gz: 7b2806094446c6c929b5cc0023630fe3291f8736a845a92a55ce157bdcb21cabe18fba13aa80483c8408990213fc0a5ac363f23bd7f306b3eebfdc9fbc4e2b64
7
- data.tar.gz: 0cdbaa9318e9e52095b57ca486f4b75210644e956d17bcc64267e23c739e7b0ed839f2863f480275e081a162b594e164ed8ebd60521e2271329f76f72bf498c6
6
+ metadata.gz: 7ee896f4d70eb673ce977a8db560cc8f193255802f36da5074791b883cfa453045a5e57c98f98ad919735eee0bbd191025e12cdaa253447f7b5fae71aed429a3
7
+ data.tar.gz: b9a82e89ba20bf80d5e7ebfe3d292452d8fa487b5f3645ea3b94862f77078386c20f77ac97cecdfd5e9740a1aee592480ab53dd6e5c6d50f7cbcf423cd1aea90
@@ -36,7 +36,8 @@ module OTP
36
36
  def verify_otp(otp)
37
37
  return nil if !valid? || !persisted? || otp_secret.blank?
38
38
 
39
- hotp = ROTP::HOTP.new(otp_secret, digits: OTP_DIGITS)
39
+ otp_digits = self.class.const_get(:OTP_DIGITS)
40
+ hotp = ROTP::HOTP.new(otp_secret, digits: otp_digits)
40
41
  transaction do
41
42
  otp_status = hotp.verify(otp.to_s, otp_counter)
42
43
  increment!(:otp_counter)
@@ -1,5 +1,5 @@
1
1
  module OTP
2
2
  module JWT
3
- VERSION = '0.2.6'
3
+ VERSION = '0.2.7'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: otp-jwt
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.6
4
+ version: 0.2.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stas Suscov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-01-09 00:00:00.000000000 Z
11
+ date: 2021-02-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport