Skip to content

Commit 9767a2a

Browse files
committed
Removing secret BC Layer in authenticator
1 parent 5e111f9 commit 9767a2a

File tree

2 files changed

+3
-30
lines changed

2 files changed

+3
-30
lines changed

src/Symfony/Component/Security/Core/Authentication/Token/RememberMeToken.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ public function getFirewallName(): string
4444

4545
public function __serialize(): array
4646
{
47-
// Newly serialized data removes the secret deprecated since Symfony 7.2 and removed in Symfony 8.0
4847
return [$this->firewallName, parent::__serialize()];
4948
}
5049

src/Symfony/Component/Security/Http/Authenticator/RememberMeAuthenticator.php

Lines changed: 3 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -43,34 +43,12 @@
4343
*/
4444
class RememberMeAuthenticator implements InteractiveAuthenticatorInterface
4545
{
46-
private string $secret;
47-
private TokenStorageInterface $tokenStorage;
48-
private string $cookieName;
49-
private ?LoggerInterface $logger;
50-
51-
/**
52-
* @param TokenStorageInterface $tokenStorage
53-
* @param string $cookieName
54-
* @param ?LoggerInterface $logger
55-
*/
5646
public function __construct(
5747
private RememberMeHandlerInterface $rememberMeHandler,
58-
#[\SensitiveParameter] TokenStorageInterface|string $tokenStorage,
59-
string|TokenStorageInterface $cookieName,
60-
LoggerInterface|string|null $logger = null,
48+
#[\SensitiveParameter] private TokenStorageInterface $tokenStorage,
49+
private string $cookieName,
50+
private LoggerInterface|null $logger = null,
6151
) {
62-
if (\is_string($tokenStorage)) {
63-
trigger_deprecation('symfony/security-http', '7.2', 'The "$secret" argument of "%s()" is deprecated.', __METHOD__);
64-
65-
$this->secret = $tokenStorage;
66-
$tokenStorage = $cookieName;
67-
$cookieName = $logger;
68-
$logger = \func_num_args() > 4 ? func_get_arg(4) : null;
69-
}
70-
71-
$this->tokenStorage = $tokenStorage;
72-
$this->cookieName = $cookieName;
73-
$this->logger = $logger;
7452
}
7553

7654
public function supports(Request $request): ?bool
@@ -109,10 +87,6 @@ public function authenticate(Request $request): Passport
10987

11088
public function createToken(Passport $passport, string $firewallName): TokenInterface
11189
{
112-
if (isset($this->secret)) {
113-
return new RememberMeToken($passport->getUser(), $firewallName, $this->secret);
114-
}
115-
11690
return new RememberMeToken($passport->getUser(), $firewallName);
11791
}
11892

0 commit comments

Comments
 (0)