Ver código fonte

security guards

Vincent GUFFON 4 anos atrás
pai
commit
b3134de8b9
1 arquivos alterados com 6 adições e 4 exclusões
  1. 6 4
      config/packages/security.yaml

+ 6 - 4
config/packages/security.yaml

@@ -123,8 +123,6 @@ security:
         App\Entity\Person\Person:
             algorithm: plaintext
 
-    enable_authenticator_manager: true
-
     # https://symfony.com/doc/current/security.html#where-do-users-come-from-user-providers
     providers:
         # used to reload user from session & other features (e.g. switch_user)
@@ -144,6 +142,7 @@ security:
         login:
             pattern:  ^/login_check
             stateless: true
+            anonymous: true
             json_login:
                 provider: person_provider
                 check_path: /login_check
@@ -154,10 +153,13 @@ security:
         api:
             pattern: ^/api/
             stateless: true
+            anonymous: true
             provider: access_provider
-            custom_authenticators:
+            guard:
+                authenticators:
                 - lexik_jwt_authentication.jwt_token_authenticator
-        main: ~
+        main:
+            anonymous: true
             # activate different ways to authenticate
             # https://symfony.com/doc/current/security.html#firewalls-authentication