Skip to content

Commit 9c136ff

Browse files
wouterjnicolas-grekas
authored andcommitted
[Security] Remove everything related to the deprecated authentication manager
1 parent 2a793e0 commit 9c136ff

File tree

69 files changed

+132
-4250
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+132
-4250
lines changed

Authentication/AuthenticationManagerInterface.php

Lines changed: 0 additions & 35 deletions
This file was deleted.

Authentication/AuthenticationProviderManager.php

Lines changed: 0 additions & 133 deletions
This file was deleted.

Authentication/AuthenticationTrustResolver.php

Lines changed: 3 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212
namespace Symfony\Component\Security\Core\Authentication;
1313

14-
use Symfony\Component\Security\Core\Authentication\Token\AnonymousToken;
1514
use Symfony\Component\Security\Core\Authentication\Token\NullToken;
1615
use Symfony\Component\Security\Core\Authentication\Token\RememberMeToken;
1716
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
@@ -25,25 +24,7 @@ class AuthenticationTrustResolver implements AuthenticationTrustResolverInterfac
2524
{
2625
public function isAuthenticated(TokenInterface $token = null): bool
2726
{
28-
return null !== $token && !$token instanceof NullToken
29-
// @deprecated since Symfony 5.4, TokenInterface::isAuthenticated() and AnonymousToken no longer exists in 6.0
30-
&& !$token instanceof AnonymousToken && $token->isAuthenticated(false);
31-
}
32-
33-
/**
34-
* {@inheritdoc}
35-
*/
36-
public function isAnonymous(TokenInterface $token = null/*, $deprecation = true*/)
37-
{
38-
if (1 === \func_num_args() || false !== func_get_arg(1)) {
39-
trigger_deprecation('symfony/security-core', '5.4', 'The "%s()" method is deprecated, use "isAuthenticated()" or "isFullFledged()" if you want to check if the request is (fully) authenticated.', __METHOD__);
40-
}
41-
42-
if (null === $token) {
43-
return false;
44-
}
45-
46-
return $token instanceof AnonymousToken || $token instanceof NullToken;
27+
return null !== $token && !$token instanceof NullToken;
4728
}
4829

4930
/**
@@ -63,10 +44,10 @@ public function isRememberMe(TokenInterface $token = null)
6344
*/
6445
public function isFullFledged(TokenInterface $token = null)
6546
{
66-
if (null === $token) {
47+
if (null === $token || $token instanceof NullToken) {
6748
return false;
6849
}
6950

70-
return !$this->isAnonymous($token, false) && !$this->isRememberMe($token);
51+
return !$this->isRememberMe($token);
7152
}
7253
}

Authentication/AuthenticationTrustResolverInterface.php

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,6 @@
2222
*/
2323
interface AuthenticationTrustResolverInterface
2424
{
25-
/**
26-
* Resolves whether the passed token implementation is authenticated
27-
* anonymously.
28-
*
29-
* If null is passed, the method must return false.
30-
*
31-
* @return bool
32-
*
33-
* @deprecated since Symfony 5.4, use !isAuthenticated() instead
34-
*/
35-
public function isAnonymous(TokenInterface $token = null);
36-
3725
/**
3826
* Resolves whether the passed token implementation is authenticated
3927
* using remember-me capabilities.

Authentication/Provider/AnonymousAuthenticationProvider.php

Lines changed: 0 additions & 69 deletions
This file was deleted.

Authentication/Provider/AuthenticationProviderInterface.php

Lines changed: 0 additions & 44 deletions
This file was deleted.

0 commit comments

Comments
 (0)