smoothcode 0.0.3 → 1.0.0
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 +4 -4
- data/lib/smoothcode/auth.rb +8 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4ba846674770db9e7109cf5ce90aa262c34528d85183bf841f7b665702cbba81
|
4
|
+
data.tar.gz: 610f09f311f76cc97198baaa4ef95cabc0a1d5fc901e8f215baab509575673b5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8f5a0160a247e1e12d12f717430445a3a0bd3e5fdd113d133d751021418443955af8b5cf33f741503d2086d9da1c86030bdc0846b1180fcff802623bb8e74fae
|
7
|
+
data.tar.gz: a09ebdb2cad9a4d01fc4c14192a830b6fc2fbd01af2da4cda33bb954a4402b71d8a95b640b5a94d5e77c7f340d56f7cc3ad04943d85cc956238d4c60b03ce14f
|
data/lib/smoothcode/auth.rb
CHANGED
@@ -12,8 +12,15 @@ class SmoothCodeAuth
|
|
12
12
|
|
13
13
|
def webhook_request?(webhook_data)
|
14
14
|
webhook_data = webhook_data.transform_keys(&:to_sym)
|
15
|
-
webhook_id = webhook_data[:
|
15
|
+
webhook_id = webhook_data[:shopify_webhook_uuid]
|
16
16
|
|
17
17
|
generate_hmac(@client_secret, webhook_id.to_s) == @request_hmac
|
18
18
|
end
|
19
|
+
|
20
|
+
def gdpr_webhook_request?(webhook_data)
|
21
|
+
webhook_data = webhook_data.transform_keys(&:to_sym)
|
22
|
+
shop_id = webhook_data[:shop_id]
|
23
|
+
|
24
|
+
generate_hmac(@client_secret, shop_id.to_s) == @request_hmac
|
25
|
+
end
|
19
26
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: smoothcode
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- SmoothCode
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-10-14 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Ruby client to interact with SmoothCode
|
14
14
|
email: hello@smoothcode.io
|
@@ -23,7 +23,7 @@ homepage: https://github.com/Smooth-Code-IO/smoothcode-client-ruby
|
|
23
23
|
licenses:
|
24
24
|
- MIT
|
25
25
|
metadata: {}
|
26
|
-
post_install_message:
|
26
|
+
post_install_message:
|
27
27
|
rdoc_options: []
|
28
28
|
require_paths:
|
29
29
|
- lib
|
@@ -38,8 +38,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
38
38
|
- !ruby/object:Gem::Version
|
39
39
|
version: '0'
|
40
40
|
requirements: []
|
41
|
-
rubygems_version: 3.0.
|
42
|
-
signing_key:
|
41
|
+
rubygems_version: 3.0.9
|
42
|
+
signing_key:
|
43
43
|
specification_version: 4
|
44
44
|
summary: Ruby client to interact with SmoothCode
|
45
45
|
test_files: []
|