Elcodi\Admin\UserBundle\Security\OneTimeLoginAuthenticator::supportsToken PHP Method

supportsToken() public method

Checks if the received token is a pre authenticated token.
public supportsToken ( Symfony\Component\Security\Core\Authentication\Token\TokenInterface $token, string $providerKey ) : boolean
$token Symfony\Component\Security\Core\Authentication\Token\TokenInterface The token received.
$providerKey string The security providerKey (The firewall security area)
return boolean Returns true if the received token is of the expected type and for the provider key we are using.
    public function supportsToken(TokenInterface $token, $providerKey)
    {
        return $token instanceof PreAuthenticatedToken && $token->getProviderKey() === $providerKey;
    }