Skip to content

Commit 3db8571

Browse files
Player626RunsTp
authored andcommitted
fix: config signature
1 parent 6dce3a5 commit 3db8571

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/BasicService/Jssdk/Client.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,14 +83,16 @@ public function dictionaryOrderSignature(...$params)
8383
* @param null $timestamp
8484
* @return array
8585
*/
86-
protected function configSignature(string $url = null, string $nonce = null, $timestamp = null): array
86+
public function configSignature(string $url = null, string $nonce = null, $timestamp = null): array
8787
{
88+
$nonce = $nonce ?? Random::character(16);
89+
$timestamp = $timestamp ?? time();
8890
return [
8991
'appId' => $this->app[ServiceProviders::Config]->get('appId'),
90-
'nonceStr' => $nonce ?? Random::character(16),
91-
'timestamp' => $timestamp ?? time(),
92+
'nonceStr' => $nonce,
93+
'timestamp' => $timestamp,
9294
'url' => $url,
9395
'signature' => $this->getTicketSignature($this->getTicket(), $nonce, $timestamp, $url),
9496
];
9597
}
96-
}
98+
}

0 commit comments

Comments
 (0)