skylab_studio 1.0.7 → 1.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/skylab_studio/client.rb +11 -0
- data/lib/skylab_studio/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8dcea80a2765d6d89b736dbdaf420595a284c66b1c2319bdb537e6dce55d6c29
|
4
|
+
data.tar.gz: 26870d180ef19254df91ce67ffeb150564c6a144ccbc8965414c48938f687486
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b01781324fb9c33b8720b54d218ed0c60f346069b04ac646e720b641c85316ef140d96821d69f1054c73a997445a0c1cc4adbf56be3c2f3a765e42c7354ea6d4
|
7
|
+
data.tar.gz: e78732d764037a41fad813879db50e04defe51ac4eb2eadd1c437693f5e8e58489c5795d135f0c4e81a3d3a4c2d17b024d2897e6733603ec5d81d8a8f41cfef6
|
data/lib/skylab_studio/client.rb
CHANGED
@@ -229,6 +229,17 @@ module SkylabStudio
|
|
229
229
|
end
|
230
230
|
end
|
231
231
|
|
232
|
+
def validate_hmac_headers(secret_key, job_json_string, request_timestamp, signature)
|
233
|
+
message = "#{request_timestamp}:#{job_json_string}".encode('utf-8')
|
234
|
+
|
235
|
+
# Create the HMAC signature using SHA-256
|
236
|
+
hmac_digest = OpenSSL::HMAC.digest('sha256', secret_key.encode('utf-8'), message)
|
237
|
+
generated_sig = Base64.strict_encode64(hmac_digest).force_encoding('utf-8')
|
238
|
+
|
239
|
+
# Compare the provided signature with the generated signature
|
240
|
+
signature == generated_sig
|
241
|
+
end
|
242
|
+
|
232
243
|
private
|
233
244
|
|
234
245
|
def get_upload_url(options = { use_cache_upload: false })
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: skylab_studio
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Paul Lam
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-04-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|