-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #30 from ConnectHolland/clear-cookie
set cookie expire to match token exire date & reset cookie on logout
- Loading branch information
Showing
4 changed files
with
32 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,6 +45,7 @@ public function testOnAuthenticationSuccess(): void | |
$this->assertSame('[email protected]', $content['payload']['user']); | ||
$this->assertCount(1, $cookies); | ||
$this->assertSame('secrettoken', $cookies[0]->getValue()); | ||
$this->assertSame(1627902433, $cookies[0]->getExpiresTime()); | ||
} | ||
|
||
public function testHandleAuthenticationSuccess() | ||
|
@@ -94,7 +95,7 @@ private function getEncoder(): JWTEncoderInterface | |
$encoder | ||
->expects($this->once()) | ||
->method('decode') | ||
->willReturn(['user' => '[email protected]']); | ||
->willReturn(['user' => '[email protected]', 'exp' => 1627902433]); | ||
|
||
return $encoder; | ||
} | ||
|