Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken::setAuthenticated PHP Метод

setAuthenticated() публичный Метод

public setAuthenticated ( $isAuthenticated )
    public function setAuthenticated($isAuthenticated)
    {
        if ($isAuthenticated) {
            throw new \LogicException('Cannot set this token to trusted after instantiation.');
        }

        parent::setAuthenticated(false);
    }

Usage Example

Пример #1
0
 public function testSetAuthenticatedToFalse()
 {
     $token = new UsernamePasswordToken('foo', 'bar', 'key');
     $token->setAuthenticated(false);
     $this->assertFalse($token->isAuthenticated());
 }
All Usage Examples Of Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken::setAuthenticated