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