Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [Symfony4] Błąd konfiguracji security.yaml dla podwójnej autoryzacji
dopelganger
post 24.10.2018, 10:18:37
Post #1





Grupa: Zarejestrowani
Postów: 236
Pomógł: 0
Dołączył: 27.10.2012

Ostrzeżenie: (0%)
-----


Witam
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

  1. security:
  2. providers:
  3. chain_provider:
  4. chain:
  5. providers: [fos_userbundle, in_memory]
  6. in_memory:
  7. memory:
  8. users:
  9. admin:
  10. password: '%env(API_REST_PASSWORD)%'
  11. roles: 'ROLE_API'
  12. fos_userbundle:
  13. #id: fos_user.user_provider.username
  14. entity: { class: App\Entity\User, property: username }
  15. firewalls:
  16. dev:
  17. pattern: ^/(_(profiler|wdt)|css|images|js)/
  18. security: false
  19. main:
  20. pattern: ^/
  21. anonymous: true
  22. http_basic:
  23. provider: in_memory
  24. logout: ~
  25.  
  26. secured_area:
  27. pattern: ^/
  28. provider: fos_userbundle
  29. form_login:
  30. csrf_token_generator: security.csrf.token_manager
  31. #login_path: fos_user_security_login
  32. #check_path: fos_user_security_check
  33.  
  34. access_control:
  35. - { path: ^/login$, role: IS_AUTHENTICATED_ANONYMOUSLY }
  36. - { path: ^/admin, role: ROLE_ADMIN }
  37. - { path: ^/data, role: ROLE_API }
  38. #- { path: ^/register, role: ROLE_ADMIN }
  39. #- { path: ^/resetting, role: ROLE_ADMIN }
  40. # - { path: ^/profile, role: ROLE_USER }
  41. encoders:
  42. Symfony\Component\Security\Core\User\User: plaintext
  43. App\Entity\User: bcrypt


Ten post edytował dopelganger 24.10.2018, 10:22:52
Go to the top of the page
+Quote Post
ohm
post 24.10.2018, 11:19:02
Post #2





Grupa: Zarejestrowani
Postów: 618
Pomógł: 143
Dołączył: 22.12.2010

Ostrzeżenie: (0%)
-----


Dla secured_area masz zakomentowany check_path
Go to the top of the page
+Quote Post
dopelganger
post 24.10.2018, 12:17:31
Post #3





Grupa: Zarejestrowani
Postów: 236
Pomógł: 0
Dołączył: 27.10.2012

Ostrzeżenie: (0%)
-----


Cytat(ohm @ 24.10.2018, 12:19:02 ) *
Dla secured_area masz zakomentowany check_path


niestety jest ten sam komunikat, po wyczyszczeniu cache etc
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Wersja Lo-Fi Aktualny czas: 23.04.2024 - 09:09