Bonjour à tous,
Pourriez vous m'aider s'il vous plaît?
Pour bypass un firewall avec oauth pour les tests, je veux créer un autre firewall que j'appellerais durant les tests mais il ne trouve pas mon authenticator je pense que c'est un problème d'autoloading.
Mon security:
Code yaml : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31 security: providers: app_user_provider: id: App\Security\UserProvider firewalls: test: host: ^127\.0\.0\.1+$ pattern: ^/api stateless: true guard: authenticators: - App\Tests\FakeAuthenticator dev: pattern: ^/(_(profiler|wdt)|css|images|js)/ security: false secured_area: pattern: ^/api stateless: true simple_preauth: authenticator: jwt_auth.jwt_authenticator static_area: pattern: ^/static stateless: true simple_preauth: authenticator: custom_auth # Easy way to control access for large sections of your site # Note: Only the *first* access control that matches will be used access_control: - { path: ^/api, roles: ROLE_USER }
Mo composer.json je pense que le soucis vient de là
mon service_test
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12 }, "autoload": { "psr-4": { "App\\": "src/" } }, "autoload-dev": { "psr-4": { "App\\Tests\\": "tests/", "Context\\": "tests/api/bootstrap/" } },
Comment puis je faire? merci
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10 # This file is the entry point to configure your own services. # Files in the packages/ subdirectory configure your dependencies. # Put parameters here that don't need to change on each machine where the app is deployed # https://symfony.com/doc/current/best_practices/configuration.html#application-related-configuration services: App\Tests\UserProvider: arguments: ['@doctrine.orm.default_entity_manager']
Partager