We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 408f0b7 commit 25ba522Copy full SHA for 25ba522
doc/security.md
@@ -70,11 +70,13 @@ $config = Configuration::forSymmetricSigner(
70
LocalFileReference::file('path/to/integration.private-key.pem')
71
);
72
73
+$now = new \DateTimeImmutable();
74
$jwt = $config->builder()
75
->issuedBy($integrationId)
- ->issuedAt(time())
76
- ->expiresAt(time() + 60)
77
- ->getToken($config->signer(), $config->signingKey()));
+ ->issuedAt($now)
+ ->expiresAt($now->modify('+1 minute'))
78
+ ->getToken($config->signer(), $config->signingKey())
79
+;
80
81
$github->authenticate($jwt, null, Github\Client::AUTH_JWT)
82
```
0 commit comments