Skip to content

Commit

Permalink
Added IssuedAt to default JWT token
Browse files Browse the repository at this point in the history
  • Loading branch information
gnat42 committed Sep 30, 2022
1 parent 07787d2 commit 204b4d9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Generator/TokenGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ public function getToken(string $uId, string $email, array $extraData = null, ?i
->issuedBy($this->issuer)
->permittedFor($this->audience)
->identifiedBy($this->id)
->issuedAt(new DateTimeImmutable())
->canOnlyBeUsedAfter(new DateTimeImmutable())
->expiresAt(new DateTimeImmutable('@' . (time() + ($expiration > 0 ? $expiration : $this->expiration))))
->withClaim('userId', $uId)
Expand Down

0 comments on commit 204b4d9

Please sign in to comment.