diff --git a/Domain/SecurityIdentityRetrievalStrategy.php b/Domain/SecurityIdentityRetrievalStrategy.php index d1e9453..8b5623c 100644 --- a/Domain/SecurityIdentityRetrievalStrategy.php +++ b/Domain/SecurityIdentityRetrievalStrategy.php @@ -78,7 +78,7 @@ public function getSecurityIdentities(TokenInterface $token) private function isNotAuthenticated(TokenInterface $token): bool { - if (\defined('\Symfony\Component\Security\Core\Authorization\Voter\AuthenticatedVoter::PUBLIC_ACCESS')) { + if (method_exists($this->authenticationTrustResolver, 'isAuthenticated')) { return !$this->authenticationTrustResolver->isAuthenticated($token); }