Skip to content

Commit

Permalink
Testing out negative numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
ziming committed Jun 17, 2019
1 parent 0d97117 commit 55538f1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/LaravelMyinfoSg.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public function generateAuthoriseApiUri() : string
'client_id' => config('laravel-myinfo-sg.client_id'),
'attributes' => config('laravel-myinfo-sg.attributes'),
'purpose' => config('laravel-myinfo-sg.purpose'),
'state' => random_int(0, PHP_INT_MAX),
'state' => random_int(PHP_INT_MIN, -1),
'redirect_uri' => config('laravel-myinfo-sg.redirect_uri'),
]);

Expand Down
2 changes: 1 addition & 1 deletion src/Services/MyinfoSecurityService.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public static function generateAuthorizationHeader(string $uri, array $params, s
*/
private static function generateSHA256withRSAHeader(string $uri, array $params, string $method, string $contentType, string $appId, string $privateKeyPath, string $passphrase)
{
$nonce = random_int(0, PHP_INT_MAX);
$nonce = random_int(PHP_INT_MIN, -1);

$timestamp = (int) round(microtime(true) * 1000);

Expand Down

0 comments on commit 55538f1

Please sign in to comment.