authenticateToken() public method

Authenticates a token.
public authenticateToken ( Symfony\Component\Security\Core\Authentication\Token\TokenInterface $token, Symfony\Component\Security\Core\User\UserProviderInterface $userProvider, string $providerKey ) : Symfony\Component\Security\Core\Authentication\Token\TokenInterface | ContaoToken | AnonymousToken
$token Symfony\Component\Security\Core\Authentication\Token\TokenInterface
$userProvider Symfony\Component\Security\Core\User\UserProviderInterface
$providerKey string
return Symfony\Component\Security\Core\Authentication\Token\TokenInterface | Contao\CoreBundle\Security\Authentication\ContaoToken | Symfony\Component\Security\Core\Authentication\Token\AnonymousToken
Ejemplo n.º 1
0
 /**
  * Tests authenticating a token without the container being set.
  *
  * @expectedException \LogicException
  */
 public function testAuthenticateTokenWithoutContainer()
 {
     $authenticator = new ContaoAuthenticator();
     $authenticator->authenticateToken(new AnonymousToken('frontend', 'anon.'), $this->mockUserProvider(), 'frontend');
 }