symfony2自定义身份验证器,核心找不到文件?

时间:2013-12-24 15:51:28

标签: php symfony

我正在尝试创建一个自定义身份验证器,我在这里遵循了教程:

http://symfony.com/doc/current/cookbook/security/custom_password_authenticator.html

但是我收到了这个错误:

ServiceNotFoundException: The service "security.authentication.manager" has a dependency on a non-existent service "security.user.provider.concrete.authenticator".

我检查了我的版本而我正在使用2.4,所以这不是问题,但似乎缺少symfony核心类?=

Security.yml

security:
    firewalls:
        dev:
            pattern:  ^/(_(profiler|wdt)|css|images|js)/
            security: false

        main:
            pattern:    ^/
            provider: authenticator
            anonymous:  ~
            simple-form:
            login_path: snap_front_login
                check_path: login_check
                authenticator: SnapsavedAuthenticator

    encoders:
        Snap\RestBundle\entity\User: plaintext

    providers:
        user_entity:
           id: SnapsavedUserprovider


    role_hierarchy:
        ROLE_USER:        ROLE_USER
        ROLE_ADMIN:       ROLE_ADMIN
        ROLE_SUPER_ADMIN: [ROLE_SUPER_ADMIN, ROLE_ALLOWED_TO_SWITCH ]

    access_control:
        - { path: ^/login, roles: IS_AUTHENTICATED_ANONYMOUSLY }
        - { path: ^/, roles: ROLE_USER }

0 个答案:

没有答案