Php Symfony security.yml-重定向循环

Php Symfony security.yml-重定向循环,php,symfony,Php,Symfony,我有下面的security.yml文件。我试图到达路径“/test”,登录后,我陷入了一个循环中 有人能指出哪里乱七八糟吗?我被难住了 # 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.yml文件。我试图到达路径“/test”,登录后,我陷入了一个循环中

有人能指出哪里乱七八糟吗?我被难住了

# 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:
        IMAG\LdapBundle\Users\LdapUser: plaintext

    # 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:
        ldap:
          id: imag_ldap.security.user.provider
    # 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
        public:
          pattern: ^/login
          security: false
        dev:
          pattern:  ^/(_(profiler|wdt)|css|images|js)/
          security: false

        restricted_area:
          pattern:  ^/
          anonymous: ~
          imag_ldap:
            check_path: login_check
            login_path: login
            intention: authenticate
            provider: ldap
          logout:
            path: /logout
            target: /

    # 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/cookbook/security/access_control.html
    access_control:
        - { path: ^/login, roles: IS_AUTHENTICATED_ANONYMOUSLY }
        - { path: ^/, roles: IS_AUTHENTICATED_FULLY }
        #- { path: ^/login, roles: IS_AUTHENTICATED_ANONYMOUSLY, requires_channel: https }

如果您的登录检查路径为“登录检查”,请更改登录模式

public:
      pattern: ^/login$