tencentcloud-simple-sign 1.0.0 → 1.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 +4 -4
- data/lib/VERSION +1 -1
- data/lib/tencentcloud-simple-sign.rb +6 -2
- 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: 577c2dd8ffcd69a98b64bec8fe5b5599e276e1011c197bbed55fe10ec7ef1796
|
4
|
+
data.tar.gz: '08617dbb6793d473569a1e70a8b70a74502104f060e7563d1edc1129286daf0f'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 523d173915af4aa46a9dd8cc69a9df45da139dc42571a0457a33760f680e4f71e8e3f1c5a3857f974b06751572c2c64b564be8daae87a1ee43600fe0889b8ff3
|
7
|
+
data.tar.gz: 93f4b6dbb3e981a9ac879c08a3c0b33d2e2e03d0d6a87086d62bdc796b8134c9e06af9265de1f21029195dfd0f02af2de8be75eca57c4b3f99cafff0ed60526d
|
data/lib/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.1
|
@@ -6,7 +6,7 @@ require 'base64'
|
|
6
6
|
module TencentCloud
|
7
7
|
class Sign
|
8
8
|
class << self
|
9
|
-
def sign_v3(secret_id, secret_key, host, timestamp, expire_timestamp)
|
9
|
+
def sign_v3(secret_id, secret_key, host, timestamp, expire_timestamp, token = '')
|
10
10
|
service = 'clbia'
|
11
11
|
method = 'POST'
|
12
12
|
content_type = 'application/json'
|
@@ -40,7 +40,11 @@ module TencentCloud
|
|
40
40
|
secret_service = OpenSSL::HMAC.digest(digest, secret_date, service)
|
41
41
|
secret_signing = OpenSSL::HMAC.digest(digest, secret_service, 'tc3_request')
|
42
42
|
signature = OpenSSL::HMAC.hexdigest(digest, secret_signing, string_to_sign)
|
43
|
-
"#{algorithm} Credential=#{secret_id}/#{credential_scope}, SignedHeaders=#{signed_headers}, SignTime=#{timestamp}, ExpireTime=#{expire_timestamp}, Signature=#{signature}"
|
43
|
+
authorization = "#{algorithm} Credential=#{secret_id}/#{credential_scope}, SignedHeaders=#{signed_headers}, SignTime=#{timestamp}, ExpireTime=#{expire_timestamp}, Signature=#{signature}"
|
44
|
+
if token != ''
|
45
|
+
authorization += ', Token=' + token
|
46
|
+
end
|
47
|
+
authorization
|
44
48
|
end
|
45
49
|
end
|
46
50
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tencentcloud-simple-sign
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tencent Cloud
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-10-
|
11
|
+
date: 2024-10-12 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Tencent Cloud Simple Sign SDK for Ruby
|
14
14
|
email:
|