Skip to content

Commit 25ba522

Browse files
committed
Apply latest changes
1 parent 408f0b7 commit 25ba522

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

doc/security.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,13 @@ $config = Configuration::forSymmetricSigner(
7070
LocalFileReference::file('path/to/integration.private-key.pem')
7171
);
7272

73+
$now = new \DateTimeImmutable();
7374
$jwt = $config->builder()
7475
->issuedBy($integrationId)
75-
->issuedAt(time())
76-
->expiresAt(time() + 60)
77-
->getToken($config->signer(), $config->signingKey()));
76+
->issuedAt($now)
77+
->expiresAt($now->modify('+1 minute'))
78+
->getToken($config->signer(), $config->signingKey())
79+
;
7880

7981
$github->authenticate($jwt, null, Github\Client::AUTH_JWT)
8082
```

0 commit comments

Comments
 (0)