🔐 Sid Gifari File Manager Pro
v8.0.5 | 2026-06-17 10:00:40 | PHP 8.1.34
📂
/ (Root)
/
opt
/
alt
/
php55
/
usr
/
share
/
pear
/
Symfony
/
Component
/
Security
/
Core
/
Authentication
/
Provider
📍 /opt/alt/php55/usr/share/pear/Symfony/Component/Security/Core/Authentication/Provider
🔄 Refresh
✏️
Editing: AnonymousAuthenticationProvider.php
Read Only
<?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Security\Core\Authentication\Provider; use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; use Symfony\Component\Security\Core\Exception\BadCredentialsException; use Symfony\Component\Security\Core\Authentication\Token\AnonymousToken; /** * AnonymousAuthenticationProvider validates AnonymousToken instances. * * @author Fabien Potencier <fabien@symfony.com> */ class AnonymousAuthenticationProvider implements AuthenticationProviderInterface { private $key; /** * Constructor. * * @param string $key The key shared with the authentication token */ public function __construct($key) { $this->key = $key; } /** * {@inheritdoc} */ public function authenticate(TokenInterface $token) { if (!$this->supports($token)) { return null; } if ($this->key !== $token->getKey()) { throw new BadCredentialsException('The Token does not contain the expected key.'); } return $token; } /** * {@inheritdoc} */ public function supports(TokenInterface $token) { return $token instanceof AnonymousToken; } }
💾 Save Changes
❌ Cancel