You must configure the check path to be handled by the firewall using form_login in your security firewall configuration

前端 未结 4 895
囚心锁ツ
囚心锁ツ 2021-01-04 11:46

i have webservice which is provider for my \"regular\" users. I want to use FosUserBundle for my administrators. Above is my security configuration. regular users login work

4条回答
  •  天涯浪人
    2021-01-04 12:11

    pattern: ^/admin

    This is possibly where your problems start.

    Try changing this back to ^/

    Then change your routes for FosUserBundle

    # app/config/routing.yml
    
    fos_user_security:
        resource: "@FOSUserBundle/Resources/config/routing/security.xml"
        prefix: /admin
    
    fos_user_profile:
        resource: "@FOSUserBundle/Resources/config/routing/profile.xml"
        prefix: /admin/profile
    
    fos_user_register:
        resource: "@FOSUserBundle/Resources/config/routing/registration.xml"
        prefix: /admin/register
    
    fos_user_resetting:
        resource: "@FOSUserBundle/Resources/config/routing/resetting.xml"
        prefix: /admin/resetting
    
    fos_user_change_password:
        resource: "@FOSUserBundle/Resources/config/routing/change_password.xml"
        prefix: /admin/profile
    

提交回复
热议问题