File tree Expand file tree Collapse file tree 1 file changed +48
-0
lines changed Expand file tree Collapse file tree 1 file changed +48
-0
lines changed Original file line number Diff line number Diff line change @@ -899,6 +899,54 @@ multiple firewalls, the "context" could actually be shared:
899899 ignored and you won't be able to authenticate on multiple firewalls at the
900900 same time.
901901
902+ stateless
903+ ~~~~~~~~~
904+
905+ Firewalls can configure a ``stateless `` boolean option in order to declare that the session mustn't be used when authenticating user:
906+
907+ .. configuration-block ::
908+
909+ .. code-block :: yaml
910+
911+ # config/packages/security.yaml
912+ security :
913+ # ...
914+
915+ firewalls :
916+ main :
917+ # ...
918+ stateless : true
919+
920+ .. code-block :: xml
921+
922+ <!-- config/packages/security.xml -->
923+ <?xml version =" 1.0" encoding =" UTF-8" ?>
924+ <srv : container xmlns =" http://symfony.com/schema/dic/security"
925+ xmlns : srv =" http://symfony.com/schema/dic/services"
926+ xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
927+ xsi : schemaLocation =" http://symfony.com/schema/dic/services
928+ https://symfony.com/schema/dic/services/services-1.0.xsd
929+ http://symfony.com/schema/dic/security
930+ https://symfony.com/schema/dic/security/security-1.0.xsd" >
931+
932+ <config >
933+ <firewall name =" main" stateless =" true" >
934+ <!-- ... -->
935+ </firewall >
936+ </config >
937+ </srv : container >
938+
939+ .. code-block :: php
940+
941+ // config/packages/security.php
942+ use Symfony\Config\SecurityConfig;
943+
944+ return static function (SecurityConfig $security) {
945+ $mainFirewall = $security->firewall('main');
946+ $mainFirewall->stateless(true);
947+ // ...
948+ };
949+
902950 User Checkers
903951~~~~~~~~~~~~~
904952
You can’t perform that action at this time.
0 commit comments