robie dwie autoryzacje : fosuserbundle i autoryzacja http dla aplikacji REST, (jak w dokumentacji: https://symfony.com/doc/4.0/security/multip...providers.html)
wszystko w obrębie jedego projektu i wyrzuca mi błąd po zalogowaniu się:
You must configure the check path to be handled by the firewall using form_login in your security firewall configuration.
Wertowałem internet w poszukiwaniu rozwiązania, robiłem na różne sposoby itd ale ciągle to samo, może ktoś podsunie jakiś pomysł. Prośba o pomoc. Dzięki.
Poniżej mój secuity.yaml
security: providers: chain_provider: chain: providers: [fos_userbundle, in_memory] in_memory: memory: users: admin: password: '%env(API_REST_PASSWORD)%' roles: 'ROLE_API' fos_userbundle: #id: fos_user.user_provider.username entity: { class: App\Entity\User, property: username } firewalls: dev: pattern: ^/(_(profiler|wdt)|css|images|js)/ security: false main: pattern: ^/ anonymous: true http_basic: provider: in_memory logout: ~ secured_area: pattern: ^/ provider: fos_userbundle form_login: csrf_token_generator: security.csrf.token_manager #login_path: fos_user_security_login #check_path: fos_user_security_check access_control: - { path: ^/login$, role: IS_AUTHENTICATED_ANONYMOUSLY } - { path: ^/admin, role: ROLE_ADMIN } - { path: ^/data, role: ROLE_API } #- { path: ^/register, role: ROLE_ADMIN } #- { path: ^/resetting, role: ROLE_ADMIN } # - { path: ^/profile, role: ROLE_USER } encoders: Symfony\Component\Security\Core\User\User: plaintext App\Entity\User: bcrypt