测试
This commit is contained in:
parent
b905b58053
commit
f2bce7816f
@ -39,7 +39,7 @@ trait SignTrait
|
||||
$apiSecret = $secret['apiSecret'];
|
||||
$host = $secret['host'];
|
||||
$request_line = $secret['requestLine'];
|
||||
$date = empty($secret['date']) ? gmdate ('D, d M Y H:i:s \G\M\T', time()) : $secret['date'];
|
||||
$date = empty($secret['date']) ? date ('D, d M Y H:i:s \G\M\T', time()) : $secret['date'];
|
||||
$signature_origin = "host: $host\ndate: $date\n$request_line";
|
||||
$signature_sha = hash_hmac('sha256', $signature_origin, $apiSecret, true);
|
||||
$signature = base64_encode($signature_sha);
|
||||
|
@ -58,7 +58,7 @@ class TcClient
|
||||
$uri = self::signUriV1(TcConstants::URI, [
|
||||
'apiKey' => $this->apiKey,
|
||||
'apiSecret' => $this->apiSecret,
|
||||
'host' => TcConstants::HOST,
|
||||
'host' => 'ceshi-worker-task.lihaink.cn',
|
||||
'requestLine' => TcConstants::REQUEST_LINE
|
||||
]);
|
||||
$body = self::generateInput($text, $this->appId, $this->uid, $this->resId, $this->requestConfig->toArray());
|
||||
|
Loading…
x
Reference in New Issue
Block a user