Post
#1
|
|
|
Grupa: Zarejestrowani Postów: 371 Pomógł: 30 Dołączył: 14.04.2010 Ostrzeżenie: (0%)
|
Witam,
Mam problem z plikiem security.yml i routingiem -tak sądzę. Poniżej plik security.yml Kod # you can read more about security in the related section of the documentation # http://symfony.com/doc/current/book/security.html security: # http://symfony.com/doc/current/book/security.html#encoding-the-user-s-password encoders: Common\UserBundle\Entity\User: algorithm: bcrypt # http://symfony.com/doc/current/book/security.html#hierarchical-roles role_hierarchy: ROLE_ADMIN: ROLE_USER ROLE_SUPER_ADMIN: [ROLE_USER, ROLE_ADMIN, ROLE_ALLOWED_TO_SWITCH] # http://symfony.com/doc/current/book/security.html#where-do-users-come-from-user-providers providers: blog_users: entity: class: CommonUserBundle:User property: username # the main part of the security, where you can set up firewalls # for specific sections of your app firewalls: # disables authentication for assets and the profiler, adapt it according to your needs dev: pattern: ^/(_(profiler|wdt)|css|img|js)/ security: false # secures part of the application blog_security: pattern: ^/ anonymous: ~ form_login: check_path: _check_path login_path: _blog_login default_target_path: blog_index logout: path: _logout target: blog_index #http_basic: # realm: "Secured Demo Area" # with these settings you can restrict or allow access for different parts # of your application based on roles, ip, host or methods # http://symfony.com/doc/current/book/security.html#security-book-access-control-matching-options access_control: #- { path: ^/login, roles: IS_AUTHENTICATED_ANONYMOUSLY, requires_channel: https } routing.yml w CommonUserBundle: Kod common_user: resource: "@CommonUserBundle/Controller/" type: annotation prefix: / _check_path: path: /login-check _logout: path: /logout Problem polega na tym że po kliku na "Zaloguj" następuje przekierowanie na ścieżkę lgon-check, co z kolei skutkuje wyświetleniem błędu:
Podpowiedzi które znalazłem do tej pory nie naprowadziły mnie niestety na rozwiązanie problemu. Od razu dodam że zapoznałem się ze stroną dokumentacji: http://symfony.com/doc/current/book/securi...-authentication Tyle tylko że nie potrafię przenieść opisu, który tam jest na mój kod ;/ jakieś sugestie co tutaj jest źle? Będę wdzięczny za pomoc i z góry dziękuję (IMG:style_emoticons/default/smile.gif) |
|
|
|
webmaniak [SF][Symfony2][SF2]Autentykacja użytkownika i security.yml 1.03.2015, 14:56:31
M4ver7071 Zamień na to :
[PHP] pobierz, plaintext _check_pa... 1.03.2015, 18:16:45
webmaniak Robiłem tak też, niestety problem jest ten sam ;/ 2.03.2015, 07:09:01
M4ver7071 Ogólnie to w Twoim routingu nie widzę trasy dla lo... 2.03.2015, 10:07:09
webmaniak Chodzi Ci o _blog_login a właściwie blog_login(w s... 2.03.2015, 11:04:30
prz3kus Masz dodane w Controller
[PHP] pobierz, plaintext... 2.03.2015, 15:20:51
webmaniak Nie, nie mam. Ale za to odpowiada chyba:
Kod_check... 2.03.2015, 17:16:44
Turson [PHP] pobierz, plaintext return array();[P... 2.03.2015, 19:19:03 
webmaniak Cytat(Turson @ 2.03.2015, 19:19:03 ) ... 2.03.2015, 20:28:48
M4ver7071 Zapytam tutaj aby nie robić drugiego tematu. Mam p... 2.03.2015, 19:29:55
M4ver7071 Zapytam tutaj aby nie robić drugiego tematu. Mam p... 2.03.2015, 19:29:56
M4ver7071 Daj :
[PHP] pobierz, plaintext public functio... 2.03.2015, 20:44:27
webmaniak Dałem tak:
[PHP] pobierz, plaintext public fun... 2.03.2015, 21:02:12
prz3kus webmaniak
Nic w tej metodzie nie trzeba zwracać, z... 3.03.2015, 20:26:32
webmaniak Cytat(prz3kus @ 3.03.2015, 20:26:32 )... 4.04.2015, 14:45:08 ![]() ![]() |
|
Aktualny czas: 23.12.2025 - 11:53 |