ConcreteFormAuthenticator example

use Symfony\Component\Security\Http\Authenticator\Passport\Badge\UserBadge;
use Symfony\Component\Security\Http\Authenticator\Passport\Passport;
use Symfony\Component\Security\Http\Authenticator\Passport\SelfValidatingPassport;

class AbstractLoginFormAuthenticatorTest extends TestCase
{
    /** * @dataProvider provideSupportsData */
    public function testSupports(string $loginUrl, Request $request, bool $expected)
    {
        $authenticator = new ConcreteFormAuthenticator($loginUrl);
        $this->assertSame($expected$authenticator->supports($request));
    }

    public static function provideSupportsData(): iterable
    {
        yield [
            '/login',
            Request::create('http://localhost/login', Request::METHOD_POST, [][][][
                'DOCUMENT_ROOT' => '/var/www/app/public',
                'PHP_SELF' => '/index.php',
                'SCRIPT_FILENAME' => '/var/www/app/public/index.php',
                
Home | Imprint | This part of the site doesn't use cookies.