File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -352,6 +352,21 @@ failure_path
352352This is the route or path that the user is redirected to after a failed login attempt.
353353It can be a relative/absolute URL or a Symfony route name.
354354
355+ form_only
356+ ............
357+
358+ **type **: ``boolean `` **default **: ``false ``
359+
360+ By setting this option to ``true ``, there will be a check the content type, which will prevent the
361+ :class: `Symfony\\ Component\\ Security\\ Http\A uthenticator\\ FormLoginAuthenticator ` from responding to requests
362+ that should be handled by :class: `Symfony\\ Component\\ Security\\ Http\A uthenticator\\ JsonLoginAuthenticator ` (i.e. the
363+ method :method: `FormLoginAuthenticator::supports <Symfony\\ Component\\ Security\\ Http\A uthenticator\\ FormLoginAuthenticator::supports> `
364+ will return ``false `` if the content type is ``application/json `` and ``true `` for form data).
365+
366+ .. versionadded :: 5.4
367+
368+ The ``form_only `` option was introduced in Symfony 5.4.
369+
355370use_forward
356371...........
357372
You can’t perform that action at this time.
0 commit comments