altcha 0.2.0 → 0.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
  SHA256:
3
- metadata.gz: 0a73eb5e2cb41fa8c01e97581e324b339b590029304626f9436c9231ccc83d6a
4
- data.tar.gz: 6638144e6618b817cbafd5493a35f73cf1d924f5f2d9ff3e0456da199ed87d95
3
+ metadata.gz: 26bd90d5f8f25ec3b565a8686fe424421326163149ce34e2fe94d9b335815394
4
+ data.tar.gz: d8a48c54a34721b77847b765c428b1068c1c6f611c4a133c5da6e77074c6e6c2
5
5
  SHA512:
6
- metadata.gz: c113ecb7813f2cff11e324138f64d44245322382b4a85943008e8be0fb739f702388c59bfe7e24fc46ab93da43ac242761106eb4f2b7bcda0c52ff3b992250c2
7
- data.tar.gz: 274512ef1fc281efd55d000aac65391e270969cbffbdb7b04b2f5ed15a7ad54278f08d37eeb0d6c9462022b026b055f2f5a20e09743fdb63a19c2135d5a36b07
6
+ metadata.gz: 646c34c483cfbb68003e149b0ccf297d0b57072f6a1df6df3fbae555fd714a1a37dd3c8333e5dec61c024ef92655ba1983333b79984372775559291c2b635db0
7
+ data.tar.gz: 8670ab596f21009624bc1808fc7f952de9431df58a2752b5c2170d34fb8970d953550e35566bdfba7d383a27be09b17fbdecd6b4946becf7fd1b2eac49be98bf
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- altcha (0.2.0)
4
+ altcha (0.2.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -17,7 +17,7 @@ This library is compatible with:
17
17
  To install the ALTCHA Ruby Library, add it to your Gemfile:
18
18
 
19
19
  ```ruby
20
- gem 'altcha', git: 'https://github.com/altcha-org/altcha-lib-rb'
20
+ gem 'altcha'
21
21
  ```
22
22
 
23
23
  Then run:
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Altcha
4
- VERSION = '0.2.0'
4
+ VERSION = '0.2.1'
5
5
  end
data/lib/altcha.rb CHANGED
@@ -376,7 +376,7 @@ module Altcha
376
376
 
377
377
  hash_data = hash(payload.algorithm, payload.verification_data)
378
378
  expected_signature = hmac_hex(payload.algorithm, hash_data, hmac_key)
379
-
379
+
380
380
  params = URI.decode_www_form(payload.verification_data).to_h
381
381
  verification_data = ServerSignatureVerificationData.new.tap do |v|
382
382
  v.classification = params['classification'] || nil
@@ -385,6 +385,8 @@ module Altcha
385
385
  v.email = params['email'] || nil
386
386
  v.expire = params['expire'] ? params['expire'].to_i : nil
387
387
  v.fields = params['fields'] ? params['fields'].split(',') : nil
388
+ v.fields_hash = params['fieldsHash'] || nil
389
+ v.ip_address = params['ipAddress'] || nil
388
390
  v.reasons = params['reasons'] ? params['reasons'].split(',') : nil
389
391
  v.score = params['score'] ? params['score'].to_f : nil
390
392
  v.time = params['time'] ? params['time'].to_i : nil
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: altcha
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Regeci