-
Notifications
You must be signed in to change notification settings - Fork 15
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 #63 from Saeven/feature/samesite-cookies
Samesite cookie policies now available.
- Loading branch information
Showing
5 changed files
with
48 additions
and
49 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -74,7 +74,8 @@ public function let(AuthenticationMapper $authenticationMapper, UserMapper $user | |
false, | ||
new PasswordNotChecked(), | ||
true, | ||
true | ||
true, | ||
'None' | ||
); | ||
} | ||
|
||
|
@@ -321,7 +322,6 @@ public function it_fails_when_any_cookies_are_missing() | |
foreach ($results as $combinations) { | ||
$comboCount = count($combinations); | ||
if ($comboCount != 0 && $comboCount < 4) { | ||
|
||
foreach ($cookieTypes as $c) { | ||
unset($_COOKIE[$c]); | ||
} | ||
|
@@ -418,7 +418,6 @@ public function it_wont_overwrite_existing_auth_on_create($authenticationMapper, | |
|
||
public function it_wont_create_auth_when_email_usernames_belong_to_user_records($authenticationMapper, User $user5) | ||
{ | ||
|
||
$user5->getId()->willReturn(5); | ||
$user5->getEmail()->willReturn('[email protected]'); | ||
$this->shouldThrow(EmailUsernameTakenException::class)->during('create', [$user5, '[email protected]', 'pepperspray']); | ||
|
@@ -455,7 +454,8 @@ public function it_will_create_new_auth_records_with_strong_passwords($authentic | |
false, | ||
new Passwdqc(), | ||
true, | ||
true | ||
true, | ||
'None' | ||
); | ||
|
||
$newAuth->getRawSessionKey()->willReturn(KeyFactory::generateEncryptionKey()->getRawKeyMaterial()); | ||
|
@@ -479,7 +479,8 @@ public function it_wont_create_new_auth_records_with_weak_passwords($authenticat | |
false, | ||
new Passwdqc(), | ||
true, | ||
true | ||
true, | ||
'None' | ||
); | ||
|
||
$newAuth->getRawSessionKey()->willReturn(KeyFactory::generateEncryptionKey()->getRawKeyMaterial()); | ||
|
@@ -505,7 +506,8 @@ public function it_wont_create_new_auth_records_with_weak_passwords_via_zxcvbn( | |
false, | ||
new Zxcvbn([]), | ||
true, | ||
true | ||
true, | ||
'None' | ||
); | ||
|
||
// Required, since the array-cast can't support closures which are passed by phpspec, even with getWrappedObject() | ||
|
@@ -563,7 +565,8 @@ public function it_fails_to_create_tokens_when_password_changes_are_prohibited($ | |
false, | ||
new PasswordNotChecked(), | ||
true, | ||
true | ||
true, | ||
'None' | ||
); | ||
$this->shouldThrow(PasswordResetProhibitedException::class)->during('createRecoveryToken', [$user]); | ||
} | ||
|
@@ -579,7 +582,8 @@ public function it_bails_on_password_changes_if_no_provider_is_set($authenticati | |
false, | ||
new PasswordNotChecked(), | ||
true, | ||
true | ||
true, | ||
'None' | ||
); | ||
$this->shouldThrow(PasswordResetProhibitedException::class)->during('changePasswordWithRecoveryToken', [$user, 123, 'string', 'string']); | ||
} | ||
|
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